Author: akazakov
Date: 2010-09-01 05:52:39 -0400 (Wed, 01 Sep 2010)
New Revision: 24593
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/CoreValidationTest.java
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreAllTests.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/DecoratorDefinitionTest.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/ValidationTest.java
Log:
https://jira.jboss.org/browse/JBIDE-2708
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreAllTests.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreAllTests.java 2010-09-01
09:38:11 UTC (rev 24592)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/CDICoreAllTests.java 2010-09-01
09:52:39 UTC (rev 24593)
@@ -37,9 +37,9 @@
import org.jboss.tools.cdi.core.test.tck.StereotypeInheritenceTest;
import org.jboss.tools.cdi.core.test.tck.validation.AnnotationsValidationTest;
import org.jboss.tools.cdi.core.test.tck.validation.BeansXmlValidationTest;
+import org.jboss.tools.cdi.core.test.tck.validation.CoreValidationTest;
import org.jboss.tools.cdi.core.test.tck.validation.DefenitionErrorsValidationTest;
import org.jboss.tools.cdi.core.test.tck.validation.DeploymentProblemsValidationTests;
-import org.jboss.tools.cdi.core.test.tck.validation.ValidationTest;
/**
* @author Alexey Kazakov
@@ -73,11 +73,11 @@
suite.addTestSuite(DecoratorDefinitionTest.class);
suite.addTestSuite(ObserverMethodResolutionTest.class);
- suite.addTestSuite(ValidationTest.class);
suite.addTestSuite(DefenitionErrorsValidationTest.class);
suite.addTestSuite(DeploymentProblemsValidationTests.class);
suite.addTestSuite(BeansXmlValidationTest.class);
suite.addTestSuite(AnnotationsValidationTest.class);
+ suite.addTestSuite(CoreValidationTest.class);
return new CDICoreTestSetup(suite);
}
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/DecoratorDefinitionTest.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/DecoratorDefinitionTest.java 2010-09-01
09:38:11 UTC (rev 24592)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/DecoratorDefinitionTest.java 2010-09-01
09:52:39 UTC (rev 24593)
@@ -15,8 +15,6 @@
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jdt.core.JavaModelException;
-import org.jboss.tools.cdi.core.IBean;
-import org.jboss.tools.cdi.core.IClassBean;
import org.jboss.tools.cdi.core.IDecorator;
import org.jboss.tools.cdi.core.IInjectionPoint;
import org.jboss.tools.cdi.core.IParametedType;
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/CoreValidationTest.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/CoreValidationTest.java
(rev 0)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/CoreValidationTest.java 2010-09-01
09:52:39 UTC (rev 24593)
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.cdi.core.test.tck.validation;
+
+import org.eclipse.jface.preference.IPersistentPreferenceStore;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.jboss.tools.cdi.core.CDICorePlugin;
+import org.jboss.tools.common.preferences.SeverityPreferences;
+
+/**
+ * @author Alexey Kazakov
+ */
+public class CoreValidationTest extends ValidationTest {
+
+ /**
+ *
https://jira.jboss.org/browse/JBIDE-6507
+ *
+ * @throws Exception
+ */
+ public void testDisabledValidator() throws Exception {
+ IPreferenceStore preferenceStore = CDICorePlugin.getDefault().getPreferenceStore();
+ preferenceStore.setValue(SeverityPreferences.ENABLE_BLOCK_PREFERENCE_NAME, false);
+ ((IPersistentPreferenceStore)preferenceStore).save();
+
+ assertNull("CDICoreValidator is still enabled.", getCDIValidator());
+
+ preferenceStore.setValue(SeverityPreferences.ENABLE_BLOCK_PREFERENCE_NAME, true);
+ ((IPersistentPreferenceStore)preferenceStore).save();
+
+ assertNotNull("CDICoreValidator is disabled.", getCDIValidator());
+ }
+}
\ No newline at end of file
Property changes on:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/CoreValidationTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/ValidationTest.java
===================================================================
---
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/ValidationTest.java 2010-09-01
09:38:11 UTC (rev 24592)
+++
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/ValidationTest.java 2010-09-01
09:52:39 UTC (rev 24593)
@@ -14,12 +14,8 @@
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.preference.IPersistentPreferenceStore;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.jboss.tools.cdi.core.CDICorePlugin;
import org.jboss.tools.cdi.core.test.tck.TCKTest;
import org.jboss.tools.cdi.internal.core.validation.CDICoreValidator;
-import org.jboss.tools.common.preferences.SeverityPreferences;
import org.jboss.tools.jst.web.kb.internal.validation.ValidationContext;
import org.jboss.tools.jst.web.kb.validation.IValidator;
import org.jboss.tools.tests.AbstractResourceMarkerTest;
@@ -29,25 +25,7 @@
*/
public class ValidationTest extends TCKTest {
- /**
- *
https://jira.jboss.org/browse/JBIDE-6507
- *
- * @throws Exception
- */
- public void testDisabledValidator() throws Exception {
- IPreferenceStore preferenceStore = CDICorePlugin.getDefault().getPreferenceStore();
- preferenceStore.setValue(SeverityPreferences.ENABLE_BLOCK_PREFERENCE_NAME, false);
- ((IPersistentPreferenceStore)preferenceStore).save();
-
- assertNull("CDICoreValidator is not be disabled.", getCDIValidator());
-
- preferenceStore.setValue(SeverityPreferences.ENABLE_BLOCK_PREFERENCE_NAME, true);
- ((IPersistentPreferenceStore)preferenceStore).save();
-
- assertNotNull("CDICoreValidator is disabled.", getCDIValidator());
- }
-
- private CDICoreValidator getCDIValidator() {
+ protected CDICoreValidator getCDIValidator() {
ValidationContext context = new ValidationContext(tckProject);
List<IValidator> validators = context.getValidators();
for (IValidator validator : validators) {