Your test is missing the container. Make sure to add
@AddonDependency(name="org.jboss.forge.furnace.container:cdi") to your
@Deployment method.
Em 01/03/2015, às 13:51, forge-users(a)lists.jboss.org escreveu:
I'm creating a forge addon and following the below folder structure of having
seperate addon, impl, tests and api folders. I wrote my Facet implementation in Impl.
I'm able to successfully execute the addon. However, I want to create some unit tests
to test my addon. I haven't even come to stage of writing tests to my addon. I have
followed
http://forge.jboss.org/document/test-your-addonhttp://forge.jboss.org/doc...
and created a sample test. This is what is there in my test
@RunWith(Arquillian.class)
public class FirstTest {
@Deployment
@Dependencies({
@AddonDependency(name = "org.codehaus.griffon.forge:griffon-forge-addon",
version = "1.0.0-SNAPSHOT") })
public static ForgeArchive getDeployment() {
ForgeArchive archive = ShrinkWrap.create(ForgeArchive.class)
.addBeansXML()
.addAsAddonDependencies(AddonDependencyEntry.create("org.codehaus.griffon.forge:griffon-forge-addon",
"1.0.0-SNAPSHOT") );
return archive;
}
@Test
public void testSomething() throws Exception {
Assert.fail("Not implemented");
}
}
When I'm trying to run this test I'm getting the following error.
h5. testSomething(org.codehaus.griffon.forge.FirstTest): Test runner could not locate
test class [org.codehaus.griffon.forge.FirstTest] in any deployed Addon.
Can anyone tell me what is the process to be followed when writing tests for our addons
if we follow the structure addon, api, impl and tests? Do we have to install the addon to
test it? Isn't there any way to test the addon without first installing? Is it
possible to test a Facet directly without running through Forge?
Posted by forums
Original post:
https://developer.jboss.org/message/920242#920242
_______________________________________________
forge-users mailing list
forge-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/forge-users