FORGE-1855: Simple Container should support singleton services

How to test this?
Because otherwise Furnace will not recognize the test as a service that can
be looked up by the test-runner.


On Fri, Jun 6, 2014 at 7:53 PM, George Gastaldi <notifications@github.com>
wrote:

> In
> tests/src/test/java/org/jboss/forge/furnace/container/simple/SingletonServiceTest.java:
>
> > +import org.junit.runner.RunWith;
> > +
> > +@RunWith(Arquillian.class)
> > +public class SingletonServiceTest
> > +{
> > +   @Deployment
> > +   @Dependencies({
> > +            @AddonDependency(name = "org.jboss.forge.furnace.container:simple")
> > +   })
> > +   public static ForgeArchive getDeployment()
> > +   {
> > +      ForgeArchive archive = ShrinkWrap.create(ForgeArchive.class)
> > +               .addClasses(SingletonServiceTest.class)
> > +               .addClasses(SimpleSingletonInstance.class)
> > +               .addAsServiceProvider(SingletonService.class, SimpleSingletonInstance.class)
> > +               .addAsServiceProvider(Service.class, SingletonServiceTest.class)
>
> Why is SingletonServiceTest being deployed as a service provider?
> … <#146739990c8aba12_>
>  Em 06/06/2014, às 18:59, Matej Briskar <notifications@github.com>
> escreveu: In
> tests/src/test/java/org/jboss/forge/furnace/container/simple/SingletonServiceTest.java:
> > +import org.junit.runner.RunWith; > + > +@RunWith(Arquillian.class) >
> +public class SingletonServiceTest > +{ > + @Deployment
> <https://github.com/Deployment> > + @Dependencies
> <https://github.com/Dependencies>({ > + @AddonDependency(name =
> "org.jboss.forge.furnace.container:simple") > + }) > + public static
> ForgeArchive getDeployment() > + { > + ForgeArchive archive =
> ShrinkWrap.create(ForgeArchive.class) > +
> .addClasses(SingletonServiceTest.class) > +
> .addClasses(SimpleSingletonInstance.class) > +
> .addAsServiceProvider(SingletonService.class,
> SimpleSingletonInstance.class) > + .addAsServiceProvider(Service.class,
> SingletonServiceTest.class) what do you mean? Classes? — Reply to this
> email directly or view it on GitHub.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/forge/furnace-simple/pull/1/files#r13515752>.
>



-- 
Lincoln Baxter, III
http://ocpsoft.org
"Simpler is better."