@Test(expected = IllegalStateException.class) public void should_throw_exception_due_to_no_maven_found() { environmentVariables.set("M2_HOME", "/path/to/nowhere"); environmentVariables.set("maven.home", "/path/to/nowhere"); MavenBuildAutomaticDeployment mavenBuildAutomaticDeployment = new MavenBuildAutomaticDeployment(); mavenBuildAutomaticDeployment.build(new TestClass(TestCaseLocalMavenClass.class)); }
@Override protected Archive<?> build(TestClass testClass) { if (testClass.isAnnotationPresent(MavenBuild.class)) { final MavenBuild mavenBuildDeployment = testClass.getAnnotation(MavenBuild.class); return runBuild(mavenBuildDeployment); } return null; }
MavenBuildAutomaticDeployment extends AbstractAutomaticDeployment { @Override protected Archive<?> build(TestClass testClass) { if (testClass.isAnnotationPresent(MavenBuild.class)) { final MavenBuild mavenBuildDeployment = testClass.getAnnotation(MavenBuild.class); return runBuild(mavenBuildDeployment); } return null; } }
MavenBuildAutomaticDeployment extends AbstractAutomaticDeployment { @Override protected Archive<?> build(TestClass testClass) { if (testClass.isAnnotationPresent(MavenBuild.class)) { final MavenBuild mavenBuildDeployment = testClass.getAnnotation(MavenBuild.class); return runBuild(mavenBuildDeployment); } return null; }  }
MavenBuildAutomaticDeployment extends AbstractAutomaticDeployment { @Override protected Archive<?> build(TestClass testClass) { if (testClass.isAnnotationPresent(MavenBuild.class)) { final MavenBuild mavenBuildDeployment = testClass.getAnnotation(MavenBuild.class); return runBuild(mavenBuildDeployment); } return null; }   }
MavenBuildAutomaticDeployment extends AbstractAutomaticDeployment { @Override protected Archive<?> build(TestClass testClass) { if (testClass.isAnnotationPresent(MavenBuild.class)) { final MavenBuild mavenBuildDeployment = testClass.getAnnotation(MavenBuild.class); return runBuild(mavenBuildDeployment); } return null; }    }