Search in sources :

Example 1 with DefaultAddressService

use of org.nhind.config.rest.impl.DefaultAddressService 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);
}
Also used : DefaultAddressService(org.nhind.config.rest.impl.DefaultAddressService) AbstractSecuredService(org.nhindirect.common.rest.AbstractSecuredService) DefaultDNSService(org.nhind.config.rest.impl.DefaultDNSService) DefaultAnchorService(org.nhind.config.rest.impl.DefaultAnchorService) DefaultAddressService(org.nhind.config.rest.impl.DefaultAddressService) AddressService(org.nhind.config.rest.AddressService) DefaultDomainService(org.nhind.config.rest.impl.DefaultDomainService) DefaultCertificateService(org.nhind.config.rest.impl.DefaultCertificateService) DefaultSettingService(org.nhind.config.rest.impl.DefaultSettingService) Injector(com.google.inject.Injector) OpenServiceSecurityManager(org.nhindirect.common.rest.OpenServiceSecurityManager) DefaultCertPolicyService(org.nhind.config.rest.impl.DefaultCertPolicyService) DefaultTrustBundleService(org.nhind.config.rest.impl.DefaultTrustBundleService) Test(org.junit.Test)

Aggregations

Injector (com.google.inject.Injector)1 Test (org.junit.Test)1 AddressService (org.nhind.config.rest.AddressService)1 DefaultAddressService (org.nhind.config.rest.impl.DefaultAddressService)1 DefaultAnchorService (org.nhind.config.rest.impl.DefaultAnchorService)1 DefaultCertPolicyService (org.nhind.config.rest.impl.DefaultCertPolicyService)1 DefaultCertificateService (org.nhind.config.rest.impl.DefaultCertificateService)1 DefaultDNSService (org.nhind.config.rest.impl.DefaultDNSService)1 DefaultDomainService (org.nhind.config.rest.impl.DefaultDomainService)1 DefaultSettingService (org.nhind.config.rest.impl.DefaultSettingService)1 DefaultTrustBundleService (org.nhind.config.rest.impl.DefaultTrustBundleService)1 AbstractSecuredService (org.nhindirect.common.rest.AbstractSecuredService)1 OpenServiceSecurityManager (org.nhindirect.common.rest.OpenServiceSecurityManager)1