Skip to content

Commit

Permalink
FORGE-1833: Tests now use simple container
Browse files Browse the repository at this point in the history
  • Loading branch information
gastaldi committed Aug 6, 2015
1 parent c78aae8 commit 9212472
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 24 deletions.
2 changes: 1 addition & 1 deletion rest-client/tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</dependency>
<dependency>
<groupId>org.jboss.forge.furnace.container</groupId>
<artifactId>cdi</artifactId>
<artifactId>simple</artifactId>
<classifier>forge-addon</classifier>
<scope>test</scope>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,13 @@
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.not;

import javax.inject.Inject;
import javax.ws.rs.client.Client;
import javax.ws.rs.core.MediaType;

import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.forge.arquillian.AddonDeployment;
import org.jboss.forge.arquillian.AddonDeployments;
import org.jboss.forge.arquillian.archive.AddonArchive;
import org.jboss.forge.furnace.repositories.AddonDependencyEntry;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.forge.furnace.container.simple.lifecycle.SimpleContainer;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
Expand All @@ -33,25 +28,14 @@
@RunWith(Arquillian.class)
public class ClientTest
{
@Deployment
@AddonDeployments({
@AddonDeployment(name = "org.jboss.forge.addon:rest-client"),
@AddonDeployment(name = "org.jboss.forge.furnace.container:cdi") })
public static AddonArchive getDeployment()
{
AddonArchive archive = ShrinkWrap.create(AddonArchive.class)
.addBeansXML()
.addAsAddonDependencies(
AddonDependencyEntry.create("org.jboss.forge.furnace.container:cdi"),
AddonDependencyEntry.create("org.jboss.forge.addon:rest-client")
);
ClientFactory clientFactory;

return archive;
@Before
public void setUp()
{
clientFactory = SimpleContainer.getServices(getClass().getClassLoader(), ClientFactory.class).get();
}

@Inject
ClientFactory clientFactory;

@Test
public void testClientImplementationAvailable() throws Exception
{
Expand Down

0 comments on commit 9212472

Please sign in to comment.