use of org.nhindirect.config.service.impl.ConfigurationServiceImpl in project nhin-d by DirectProject.
the class ConfigurationServiceTest method testGetDomain.
/**
* Test the getDomain method.
*/
public void testGetDomain() throws Exception {
final DomainService domainService = context.mock(DomainService.class);
final long domainId = 4L;
context.checking(new Expectations() {
{
oneOf(domainService).getDomain(domainId);
}
});
ConfigurationServiceImpl service = new ConfigurationServiceImpl();
service.setDomainSvc(domainService);
try {
service.getDomain(domainId);
} catch (Exception e) {
fail("Exception thrown");
}
}
use of org.nhindirect.config.service.impl.ConfigurationServiceImpl in project nhin-d by DirectProject.
the class ConfigurationServiceTest method testGetDomainCount.
/**
* Test the getDomainCount method.
*/
public void testGetDomainCount() throws Exception {
final DomainService domainService = context.mock(DomainService.class);
context.checking(new Expectations() {
{
oneOf(domainService).getDomainCount();
}
});
ConfigurationServiceImpl service = new ConfigurationServiceImpl();
service.setDomainSvc(domainService);
try {
service.getDomainCount();
} catch (Exception e) {
fail("Exception thrown");
}
}
use of org.nhindirect.config.service.impl.ConfigurationServiceImpl in project nhin-d by DirectProject.
the class ConfigurationServiceTest method testSetAnchorStatusForOwner.
/**
* Test the setAnchorStatusForOwner method.
*/
public void testSetAnchorStatusForOwner() throws Exception {
final AnchorService anchorService = context.mock(AnchorService.class);
final String owner = "owner";
final EntityStatus status = EntityStatus.ENABLED;
context.checking(new Expectations() {
{
oneOf(anchorService).setAnchorStatusForOwner(owner, status);
}
});
ConfigurationServiceImpl service = new ConfigurationServiceImpl();
service.setAnchorSvc(anchorService);
try {
service.setAnchorStatusForOwner(owner, status);
} catch (Exception e) {
fail("Exception thrown");
}
}
use of org.nhindirect.config.service.impl.ConfigurationServiceImpl in project nhin-d by DirectProject.
the class ConfigurationServiceTest method testSetCertificateStatusForOwner.
/**
* Test the setCertificateStatusForOwner method.
*/
public void testSetCertificateStatusForOwner() throws Exception {
final CertificateService certificateService = context.mock(CertificateService.class);
final String owner = "owner";
final EntityStatus status = EntityStatus.ENABLED;
context.checking(new Expectations() {
{
oneOf(certificateService).setCertificateStatusForOwner(owner, status);
}
});
ConfigurationServiceImpl service = new ConfigurationServiceImpl();
service.setCertSvc(certificateService);
try {
service.setCertificateStatusForOwner(owner, status);
} catch (Exception e) {
fail("Exception thrown");
}
}
use of org.nhindirect.config.service.impl.ConfigurationServiceImpl in project nhin-d by DirectProject.
the class ConfigurationServiceTest method testGetAnchorsForOwner.
/**
* Test the getAnchorsForOwner method.
*/
public void testGetAnchorsForOwner() throws Exception {
final AnchorService anchorService = context.mock(AnchorService.class);
final String owner = "owner";
final CertificateGetOptions options = CertificateGetOptions.DEFAULT;
context.checking(new Expectations() {
{
oneOf(anchorService).getAnchorsForOwner(owner, options);
}
});
ConfigurationServiceImpl service = new ConfigurationServiceImpl();
service.setAnchorSvc(anchorService);
try {
service.getAnchorsForOwner(owner, options);
} catch (Exception e) {
fail("Exception thrown");
}
}
Aggregations