Search in sources :

Example 41 with ConfigurationServiceImpl

use of org.nhindirect.config.service.impl.ConfigurationServiceImpl in project nhin-d by DirectProject.

the class ConfigurationServiceTest method testAddDomain.

/**
     * Test the addDomain method.
     */
public void testAddDomain() throws Exception {
    final DomainService domainService = context.mock(DomainService.class);
    final Domain domain = new Domain("domain");
    context.checking(new Expectations() {

        {
            oneOf(domainService).addDomain(domain);
        }
    });
    ConfigurationServiceImpl service = new ConfigurationServiceImpl();
    service.setDomainSvc(domainService);
    try {
        service.addDomain(domain);
    } catch (Exception e) {
        fail("Exception thrown");
    }
}
Also used : Expectations(org.jmock.Expectations) Domain(org.nhindirect.config.store.Domain) ConfigurationServiceImpl(org.nhindirect.config.service.impl.ConfigurationServiceImpl)

Aggregations

Expectations (org.jmock.Expectations)41 ConfigurationServiceImpl (org.nhindirect.config.service.impl.ConfigurationServiceImpl)41 CertificateGetOptions (org.nhindirect.config.service.impl.CertificateGetOptions)10 EntityStatus (org.nhindirect.config.store.EntityStatus)5 Domain (org.nhindirect.config.store.Domain)4 Address (org.nhindirect.config.store.Address)2 Certificate (org.nhindirect.config.store.Certificate)2 Anchor (org.nhindirect.config.store.Anchor)1