use of org.nhind.config.rest.impl.DefaultSettingService in project nhin-d by DirectProject.
the class DefaultRESTServiceModule_createServiceTest method testCreateServiceFromModule.
@Test
public void testCreateServiceFromModule() throws Exception {
final Injector configInjector = Guice.createInjector(DefaultRESTServiceModule.create("http://bogus", new OpenServiceSecurityManager()));
AbstractSecuredService service = (AbstractSecuredService) configInjector.getInstance(AddressService.class);
assertTrue(service instanceof DefaultAddressService);
service = (AbstractSecuredService) configInjector.getInstance(AnchorService.class);
assertTrue(service instanceof DefaultAnchorService);
service = (AbstractSecuredService) configInjector.getInstance(CertificateService.class);
assertTrue(service instanceof DefaultCertificateService);
service = (AbstractSecuredService) configInjector.getInstance(CertPolicyService.class);
assertTrue(service instanceof DefaultCertPolicyService);
service = (AbstractSecuredService) configInjector.getInstance(DNSService.class);
assertTrue(service instanceof DefaultDNSService);
service = (AbstractSecuredService) configInjector.getInstance(DomainService.class);
assertTrue(service instanceof DefaultDomainService);
service = (AbstractSecuredService) configInjector.getInstance(SettingService.class);
assertTrue(service instanceof DefaultSettingService);
service = (AbstractSecuredService) configInjector.getInstance(TrustBundleService.class);
assertTrue(service instanceof DefaultTrustBundleService);
}
Aggregations