}
controller.setValueFor("addonDependencies", addonDependency);
Assert.assertTrue(controller.canExecute());
Result result = controller.execute();
Assert.assertFalse(result instanceof Failed);
DependencyFacet deps = project.getFacet(DependencyFacet.class);
{
Dependency dependency = DependencyBuilder.create(funaceContainerAddonId.getName()).setVersion(
funaceContainerAddonId.getVersion().toString())
.setClassifier(MavenAddonDependencyResolver.FORGE_ADDON_CLASSIFIER).setScopeType("test");
Assert.assertTrue(deps.hasEffectiveDependency(dependency));
}
{
Dependency dependency = DependencyBuilder.create(addonDependency.getName()).setVersion(
addonDependency.getVersion().toString())
.setClassifier(MavenAddonDependencyResolver.FORGE_ADDON_CLASSIFIER).setScopeType("test");
Assert.assertTrue(deps.hasEffectiveDependency(dependency));
}
JavaSourceFacet facet = project.getFacet(JavaSourceFacet.class);
JavaResource javaResource = facet.getTestJavaResource("org.jboss.forge.test.MyTestCase");
Assert.assertNotNull(javaResource);
Assert.assertThat(javaResource.getJavaType(), is(instanceOf(JavaClass.class)));