Java Code Examples for org.jboss.arquillian.test.spi.TestClass#isAnnotationPresent()
The following examples show how to use
org.jboss.arquillian.test.spi.TestClass#isAnnotationPresent() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FileAutomaticDeployment.java From arquillian-container-chameleon with Apache License 2.0 | 6 votes |
@Override protected Archive<?> build(TestClass testClass) { if (testClass.isAnnotationPresent(File.class)) { final File file = testClass.getAnnotation(File.class); final String location = file.value(); java.io.File archiveLocation = new java.io.File(location); if (!archiveLocation.isAbsolute()) { String rootPath = Paths.get(".").toAbsolutePath().toString(); archiveLocation = new java.io.File(rootPath, location); } return ShrinkWrap .create(ZipImporter.class, getArchiveName(location)) .importFrom(archiveLocation) .as(file.type()); } return null; }
Example 2
Source File: MavenBuildAutomaticDeployment.java From arquillian-container-chameleon with Apache License 2.0 | 5 votes |
@Override protected Archive<?> build(TestClass testClass) { if (testClass.isAnnotationPresent(MavenBuild.class)) { final MavenBuild mavenBuildDeployment = testClass.getAnnotation(MavenBuild.class); return runBuild(mavenBuildDeployment); } return null; }
Example 3
Source File: GradleBuildAutomaticDeployment.java From arquillian-container-chameleon with Apache License 2.0 | 5 votes |
@Override protected Archive<?> build(TestClass testClass) { if (testClass.isAnnotationPresent(GradleBuild.class)) { final GradleBuild gradleBuildDeployment = testClass.getAnnotation(GradleBuild.class); return runBuild(gradleBuildDeployment); } return null; }
Example 4
Source File: DeploymentConfigurationPopulator.java From arquillian-container-chameleon with Apache License 2.0 | 5 votes |
private static DeploymentParameters resolveDeployment(TestClass testClass) { if (testClass.isAnnotationPresent(DeploymentParameters.class)) { return testClass.getAnnotation(DeploymentParameters.class); } else { return new DeploymentParametersAnnotationClass(); } }