use of org.nhindirect.config.service.impl.ConfigurationServiceImpl in project nhin-d by DirectProject.
the class ConfigurationServiceTest method testRemoveAnchorsForOwner.
/**
* Test the removeAnchorsForOwner method.
*/
public void testRemoveAnchorsForOwner() throws Exception {
final AnchorService anchorService = context.mock(AnchorService.class);
final String owner = "owner";
context.checking(new Expectations() {
{
oneOf(anchorService).removeAnchorsForOwner(owner);
}
});
ConfigurationServiceImpl service = new ConfigurationServiceImpl();
service.setAnchorSvc(anchorService);
try {
service.removeAnchorsForOwner(owner);
} catch (Exception e) {
fail("Exception thrown");
}
}
use of org.nhindirect.config.service.impl.ConfigurationServiceImpl in project nhin-d by DirectProject.
the class ConfigurationServiceTest method testRemoveDomains.
/**
* Test the removeDomains method.
*/
public void testRemoveDomains() throws Exception {
final DomainService domainService = context.mock(DomainService.class);
final String domain = "domain";
context.checking(new Expectations() {
{
oneOf(domainService).removeDomain(domain);
}
});
ConfigurationServiceImpl service = new ConfigurationServiceImpl();
service.setDomainSvc(domainService);
try {
service.removeDomain(domain);
} catch (Exception e) {
fail("Exception thrown");
}
}
use of org.nhindirect.config.service.impl.ConfigurationServiceImpl in project nhin-d by DirectProject.
the class ConfigurationServiceTest method testRemoveDomain.
/**
* Test the removeDomain method.
*/
@SuppressWarnings("deprecation")
public void testRemoveDomain() throws Exception {
final DomainService domainService = context.mock(DomainService.class);
final String domain = "domain";
context.checking(new Expectations() {
{
oneOf(domainService).removeDomain(domain);
}
});
ConfigurationServiceImpl service = new ConfigurationServiceImpl();
service.setDomainSvc(domainService);
try {
service.removeDomain(domain);
} catch (Exception e) {
fail("Exception thrown");
}
}
use of org.nhindirect.config.service.impl.ConfigurationServiceImpl in project nhin-d by DirectProject.
the class ConfigurationServiceTest method testAddCertificate.
/**
* Test the addCertificate method.
*/
public void testAddCertificate() throws Exception {
final CertificateService certificateService = context.mock(CertificateService.class);
final Collection<Certificate> collection = Arrays.asList(new Certificate());
context.checking(new Expectations() {
{
oneOf(certificateService).addCertificates(collection);
}
});
ConfigurationServiceImpl service = new ConfigurationServiceImpl();
service.setCertSvc(certificateService);
try {
service.addCertificates(collection);
} catch (Exception e) {
fail("Exception thrown");
}
}
use of org.nhindirect.config.service.impl.ConfigurationServiceImpl in project nhin-d by DirectProject.
the class ConfigurationServiceTest method testSetCertficateStatus.
/**
* Test the setCertificateStatus method.
*/
public void testSetCertficateStatus() throws Exception {
final CertificateService certificateService = context.mock(CertificateService.class);
final Collection<Long> collection = Arrays.asList(2L, 3L);
final EntityStatus status = EntityStatus.ENABLED;
context.checking(new Expectations() {
{
oneOf(certificateService).setCertificateStatus(collection, status);
}
});
ConfigurationServiceImpl service = new ConfigurationServiceImpl();
service.setCertSvc(certificateService);
try {
service.setCertificateStatus(collection, status);
} catch (Exception e) {
fail("Exception thrown");
}
}
Aggregations