use of org.nhindirect.config.store.EntityStatus in project nhin-d by DirectProject.
the class CertificateServiceTest method testSetCertificateStatusForOwner.
/**
* Test the setCertificateStatusForOwner method.
*/
public void testSetCertificateStatusForOwner() {
final CertificateDao certificateDao = context.mock(CertificateDao.class);
final String owner = "beau";
final EntityStatus status = EntityStatus.ENABLED;
context.checking(new Expectations() {
{
oneOf(certificateDao).setStatus(owner, status);
}
});
CertificateServiceImpl service = new CertificateServiceImpl();
service.setDao(certificateDao);
try {
service.setCertificateStatusForOwner(owner, status);
} catch (Exception e) {
fail("Exception thrown");
}
}
use of org.nhindirect.config.store.EntityStatus 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");
}
}
use of org.nhindirect.config.store.EntityStatus in project nhin-d by DirectProject.
the class ConfigurationServiceTest method testGetAddresses.
/**
* Test the getAddresses method.
*/
public void testGetAddresses() throws Exception {
final AddressService addressService = context.mock(AddressService.class);
final Collection<String> collection = Arrays.asList("address1", "address2");
final EntityStatus status = EntityStatus.ENABLED;
context.checking(new Expectations() {
{
oneOf(addressService).getAddress(collection, status);
}
});
ConfigurationServiceImpl service = new ConfigurationServiceImpl();
service.setAddressSvc(addressService);
try {
service.getAddress(collection, status);
} catch (Exception e) {
fail("Exception thrown");
}
}
use of org.nhindirect.config.store.EntityStatus 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.store.EntityStatus 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");
}
}
Aggregations