[jbosstools-commits] JBoss Tools SVN: r40815 - in trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test: beansxml and 2 other directories.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Mon May 7 04:54:53 EDT 2012


Author: jjankovi
Date: 2012-05-07 04:54:53 -0400 (Mon, 07 May 2012)
New Revision: 40815

Modified:
   trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/annotations/ValidationType.java
   trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/beansxml/BeansXMLValidationTest.java
   trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/base/BeansXMLQuickFixTestBase.java
   trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/validators/BeansXmlValidationProvider.java
Log:
modifying xml validation tests according to JBIDE-11731

Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/annotations/ValidationType.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/annotations/ValidationType.java	2012-05-07 08:40:48 UTC (rev 40814)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/annotations/ValidationType.java	2012-05-07 08:54:53 UTC (rev 40815)
@@ -14,7 +14,7 @@
 	
 	SERIALIZABLE, MULTIPLE_BEAN_ELIGIBLE, NO_BEAN_ELIGIBLE, DISPOSES, OBSERVES,
 	PRODUCES, TARGET, RETENTION, TYPED, NAMED, NONBINDING, SPECIALIZES, STATELESS,
-	NO_CLASS, NO_ANNOTATION, ALTERNATIVE_BEAN_XML, ALTERNATIVE_STEREOTYPE_BEAN_XML,
-	SPECIFY_ALTERNATIVE, SPECIFY_DECORATOR, SPECIFY_INTERCEPTOR, 
+	NO_CLASS, NO_ANNOTATION, NO_ALTERNATIVE_STEREOTYPE,
+	NO_ALTERNATIVE, NO_DECORATOR, NO_INTERCEPTOR, 
 
 }

Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/beansxml/BeansXMLValidationTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/beansxml/BeansXMLValidationTest.java	2012-05-07 08:40:48 UTC (rev 40814)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/beansxml/BeansXMLValidationTest.java	2012-05-07 08:54:53 UTC (rev 40815)
@@ -71,7 +71,7 @@
 		
 		beansHelper.createBeansXMLWithInterceptor(getProjectName(), getPackageName(), someBean);
 		assertFalse(isBeanXMLValidationErrorEmpty());
-		assertNotNull(getProblem(ValidationType.SPECIFY_INTERCEPTOR));
+		assertNotNull(getProblem(ValidationType.NO_INTERCEPTOR));
 		
 	}
 	
@@ -97,7 +97,7 @@
 		
 		beansHelper.createBeansXMLWithDecorator(getProjectName(), getPackageName(), someBean);
 		assertFalse(isBeanXMLValidationErrorEmpty());
-		assertNotNull(getProblem(ValidationType.SPECIFY_DECORATOR));
+		assertNotNull(getProblem(ValidationType.NO_DECORATOR));
 	}
 	
 	@Test
@@ -122,7 +122,7 @@
 		
 		beansHelper.createBeansXMLWithAlternative(getProjectName(), getPackageName(), someBean);
 		assertFalse(isBeanXMLValidationErrorEmpty());
-		assertNotNull(getProblem(ValidationType.SPECIFY_ALTERNATIVE));
+		assertNotNull(getProblem(ValidationType.NO_ALTERNATIVE));
 		
 	}
 	

Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/base/BeansXMLQuickFixTestBase.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/base/BeansXMLQuickFixTestBase.java	2012-05-07 08:40:48 UTC (rev 40814)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/base/BeansXMLQuickFixTestBase.java	2012-05-07 08:54:53 UTC (rev 40815)
@@ -143,7 +143,7 @@
 	 */
 	public void resolveAddAlternativeToBean(String name) {
 		
-		openBeanXMLValidationProblem(ValidationType.ALTERNATIVE_BEAN_XML);
+		openBeanXMLValidationProblem(ValidationType.NO_ALTERNATIVE);
 		String content = bot.editorByTitle(name + ".java").toTextEditor().getText();
 		assertTrue(content.contains("@Alternative"));
 		
@@ -157,7 +157,7 @@
 	 */
 	public void resolveAddAlternativeToStereotype(String name) {
 		
-		openBeanXMLValidationProblem(ValidationType.ALTERNATIVE_STEREOTYPE_BEAN_XML);
+		openBeanXMLValidationProblem(ValidationType.NO_ALTERNATIVE_STEREOTYPE);
 		String content = bot.editorByTitle(name + ".java").toTextEditor().getText();
 		assertTrue(content.contains("@Alternative"));
 		

Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/validators/BeansXmlValidationProvider.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/validators/BeansXmlValidationProvider.java	2012-05-07 08:40:48 UTC (rev 40814)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/quickfix/validators/BeansXmlValidationProvider.java	2012-05-07 08:54:53 UTC (rev 40815)
@@ -25,26 +25,23 @@
 	void init() {
 		
 		problems.add(new ValidationProblem(ProblemsType.ERRORS, ValidationType.NO_CLASS, 
-				"There is no class with the specified name"));
+				"There is no class"));
 		
 		problems.add(new ValidationProblem(ProblemsType.ERRORS, ValidationType.NO_ANNOTATION,
-				"There is no annotation with the specified name"));
+				"There is no annotation"));
 		
-		problems.add(new ValidationProblem(ProblemsType.ERRORS, ValidationType.ALTERNATIVE_BEAN_XML,
-				"<class> element must specify the name of an alternative bean class"));
+		problems.add(new ValidationProblem(ProblemsType.ERRORS, ValidationType.NO_ALTERNATIVE_STEREOTYPE,
+				"is not @Alternative stereotype annotation"));
 		
-		problems.add(new ValidationProblem(ProblemsType.ERRORS, ValidationType.ALTERNATIVE_STEREOTYPE_BEAN_XML,
-				"<stereotype> element must specify the name of an @Alternative stereotype annotation"));
+		problems.add(new ValidationProblem(ProblemsType.ERRORS, ValidationType.NO_ALTERNATIVE,
+				"is not an alternative bean class"));
 		
-		problems.add(new ValidationProblem(ProblemsType.ERRORS, ValidationType.SPECIFY_ALTERNATIVE,
-				"must specify the name of an alternative bean class"));
+		problems.add(new ValidationProblem(ProblemsType.ERRORS, ValidationType.NO_DECORATOR,
+				"is not a decorator bean class"));
 		
-		problems.add(new ValidationProblem(ProblemsType.ERRORS, ValidationType.SPECIFY_DECORATOR,
-				"must specify the name of a decorator bean class"));
+		problems.add(new ValidationProblem(ProblemsType.ERRORS, ValidationType.NO_INTERCEPTOR,
+				"is not an interceptor class"));
 		
-		problems.add(new ValidationProblem(ProblemsType.ERRORS, ValidationType.SPECIFY_INTERCEPTOR,
-				"must specify the name of an interceptor class"));
-		
 	}
 	
 }



More information about the jbosstools-commits mailing list