Github user rajivpjs commented on a diff in the pull request: https://github.com/apache/maven/pull/88#discussion_r71407078 --- Diff: maven-model-builder/src/test/java/org/apache/maven/model/building/ComplexActivationTest.java --- @@ -56,5 +56,26 @@ public void testAndConditionInActivation() assertEquals( "activated-1", result.getEffectiveModel().getProperties().get( "profile.file" ) ); assertNull( result.getEffectiveModel().getProperties().get( "profile.miss" ) ); } + + public void testConditionExistingAndMissingInActivation() throws Exception + { + Properties sysProperties = new Properties(); + sysProperties.setProperty( "myproperty", "test" ); + + ModelBuilder builder = new DefaultModelBuilderFactory().newInstance(); + assertNotNull( builder ); + + DefaultModelBuildingRequest request = new DefaultModelBuildingRequest(); + request.setProcessPlugins( true ); + request.setPomFile( getPom( "complexEmptyAndMissing" ) ); + request.setSystemProperties( sysProperties ); + + try { --- End diff -- oh ok!!! I think it is a great idea. Usually, when I want to test for Exceptions I use annotation approach like having @Test(expected = Exception.class). However, looking at the existing examples of Apache I couldn't find any. So, I actually learnt the Rule approach is kind of equivalent. I am just applying the change. Thanks.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org