New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JBIDE-24963-6 - add new testclasses for CDI 2.0 #1958
Conversation
3c6329a
to
268f4d4
Compare
testPR |
2 similar comments
testPR |
testPR |
b899668
to
41a14af
Compare
@@ -41,6 +44,9 @@ | |||
AllAssignableDialogTestCDI20.class, | |||
AssignableDialogFilterTestCDI20.class, | |||
AsYouTypeValidationTestCDI20.class, | |||
BeanDiscoveryInExplicitArchivesTest20.class, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stick with naming convention and use CDI20.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Counts for every class of course.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
Marker validation = markers.get(0); | ||
assertEquals(validation.getLineNumber(), 7); | ||
assertTrue(validation.getText().contains("No bean is eligible for injection")); | ||
super.validationOfBeanDiscoveryInImplicitArchives(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add CDI11 pattern to the class name. Also, In new CDI20 test classes you have specified CDIVersion, add it to the CDI 11 classes as well, of course, value will be for 1.2 or 1.1.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CDIVersion specification add to the CDI 11 classes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CDI11 pattern added to the class name.
assertEquals(1, markers.size()); | ||
Marker validation = markers.get(0); | ||
assertEquals(validation.getLineNumber(), 8); | ||
assertTrue(validation.getText().contains("No bean is eligible for injection")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will need to improve the message/problem check. Here was checked only problem's short message, now we have to distinguish between CDI11 and CDI20 - JSR-346 and JSR-365 specs. Some validator would solve the issue well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
assertEquals(1, markers.size()); | ||
Marker validation = markers.get(0); | ||
assertEquals(validation.getLineNumber(), 7); | ||
assertTrue(validation.getText().contains("No bean is eligible for injection")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
5507ea2
to
6c67bcd
Compare
assertEquals(1, problems.size()); | ||
Problem validation = problems.get(0); | ||
assertTrue(validation.getLocation().contains("7")); | ||
assertTrue(validation.getDescription().contains("No bean is eligible for injection")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here also should be particular JSR number in warning messaged checked.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
* @author zcervink | ||
* | ||
*/ | ||
public class BeanParametersAnnotationTemplate extends CDITestBase { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move the class from foo.fooo.foooo.annotation.cdi11 to foo.fooo.foooo.annotation.template package. Same for any other template class that is misplaced in *.cdiXX folder. It should be place in its own template package within * (discovery, annotation) package. Check the other classes ;). This also count for any other PRs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved.
import org.jboss.ide.eclipse.as.reddeer.server.family.ServerMatcher; | ||
import org.jboss.ide.eclipse.as.reddeer.server.requirement.ServerRequirement.JBossServer; | ||
import org.jboss.tools.cdi.bot.test.CDITestBase; | ||
import org.jboss.tools.cdi.bot.test.beansxml.discovery.cdi11.BeanDiscoveryInArchivesTemplate; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move template class into its own package as it is being used by both cdi version tests (1.1 and 2.0).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
@@ -49,7 +31,7 @@ | |||
@JRE(cleanup=true) | |||
@OpenPerspective(JavaEEPerspective.class) | |||
@JBossServer(state=ServerRequirementState.PRESENT, cleanup=false) | |||
public class BeanParametersAnnotationTest extends CDITestBase { | |||
public class BeanParametersAnnotationTest extends BeanParametersAnnotationTemplate { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add suffix CDI11 to this test class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
+1. Good work. @jkopriva Merge please. And consider giving me rights to this repo... :) |
0820b71
to
79c1753
Compare
- BeanDiscoveryInExplicitArchivesTest20.class - BeanDiscoveryInImplicitArchivesTest20.class - BeanParametersAnnotationTest20.class Signed-off-by: Zbynek Cervinka <zcervink@redhat.com>
JBIDE-24963-6 - Add the following testclasses:
Signed-off-by: Zbynek Cervinka zcervink@redhat.com
Jenkins: https://dev-platform-jenkins.rhev-ci-vms.eng.rdu2.redhat.com/job/cdi20.itests/76/
Jira: https://issues.jboss.org/browse/JBIDE-24963
please review @jkopriva