Package org.jboss.arquillian.core.impl.loadable.util

Examples of org.jboss.arquillian.core.impl.loadable.util.FakeService


   public void shouldBeAbleToLoadOnlyOne() throws Exception
   {
      ServiceRegistry registry = new ServiceRegistry(injector.get());
      registry.addService(FakeService.class, ShouldBeIncluded.class);
     
      FakeService service = registry.getServiceLoader().onlyOne(FakeService.class);
     
      Assert.assertNotNull(service);
      Assert.assertTrue(
            "Verify service is of expected type",
            service instanceof ShouldBeIncluded);
View Full Code Here


   {
      ServiceRegistry registry = new ServiceRegistry(injector.get());
     
      Assert.assertNull(registry.getServiceLoader().onlyOne(FakeService.class));
     
      FakeService service = registry.getServiceLoader().onlyOne(FakeService.class, ShouldBeIncluded.class);
      Assert.assertNotNull(service);
      Assert.assertTrue(
            "Verify service is of expected type",
            service instanceof ShouldBeIncluded);
   }
View Full Code Here

      bind(ApplicationScoped.class, String.class, "TEST");
     
      ServiceRegistry registry = new ServiceRegistry(injector.get());
      registry.addService(FakeService.class, ShouldBeIncluded.class);
     
      FakeService service = registry.getServiceLoader().onlyOne(FakeService.class);
      Assert.assertTrue(
            "Verify service has been statically injected",
            service.isValid());
   }
View Full Code Here

     
      ServiceRegistry registry = new ServiceRegistry(injector.get());

      Assert.assertNull(registry.getServiceLoader().onlyOne(FakeService.class));

      FakeService service = registry.getServiceLoader().onlyOne(FakeService.class, ShouldBeIncluded.class);
      Assert.assertTrue(
            "Verify service has been statically injected",
            service.isValid());
   }
View Full Code Here

   public void shouldBeAbleToLoadProtectedServices() throws Exception {
      ServiceRegistry registry = new ServiceRegistry(injector.get());
      registry.addService(
            FakeService.class, (Class<FakeService>)Class.forName("org.jboss.arquillian.core.impl.loadable.util.PackageProtectedService"));
  
      FakeService service = registry.getServiceLoader().onlyOne(FakeService.class);
      Assert.assertNotNull("Could load package protected service", service);
   }
View Full Code Here

TOP

Related Classes of org.jboss.arquillian.core.impl.loadable.util.FakeService

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.