use of org.nhindirect.config.service.impl.ConfigurationServiceImpl in project nhin-d by DirectProject.
the class ConfigurationServiceTest method testRemoveAnchors.
/**
* Test the removeAnchors method.
*/
public void testRemoveAnchors() throws Exception {
final AnchorService anchorService = context.mock(AnchorService.class);
final Collection<Long> collection = Arrays.asList(3L, 4L);
context.checking(new Expectations() {
{
oneOf(anchorService).removeAnchors(collection);
}
});
ConfigurationServiceImpl service = new ConfigurationServiceImpl();
service.setAnchorSvc(anchorService);
try {
service.removeAnchors(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 testGetCertificate.
/**
* Test the getCertificate method.
*/
public void testGetCertificate() throws Exception {
final CertificateService certificateService = context.mock(CertificateService.class);
final String owner = "owner";
final String thumbprint = "thumbprint";
final CertificateGetOptions certificateGetOptions = CertificateGetOptions.DEFAULT;
context.checking(new Expectations() {
{
oneOf(certificateService).getCertificate(owner, thumbprint, certificateGetOptions);
}
});
ConfigurationServiceImpl service = new ConfigurationServiceImpl();
service.setCertSvc(certificateService);
try {
service.getCertificate(owner, thumbprint, certificateGetOptions);
} catch (Exception e) {
fail("Exception thrown");
}
}
use of org.nhindirect.config.service.impl.ConfigurationServiceImpl in project nhin-d by DirectProject.
the class ConfigurationServiceTest method testGetCertificatesForOwner.
/**
* Test the getCertificatesForOwner method.
*/
public void testGetCertificatesForOwner() throws Exception {
final CertificateService certificateService = context.mock(CertificateService.class);
final String owner = "owner";
final CertificateGetOptions certificateGetOptions = CertificateGetOptions.DEFAULT;
context.checking(new Expectations() {
{
oneOf(certificateService).getCertificatesForOwner(owner, certificateGetOptions);
}
});
ConfigurationServiceImpl service = new ConfigurationServiceImpl();
service.setCertSvc(certificateService);
try {
service.getCertificatesForOwner(owner, certificateGetOptions);
} catch (Exception e) {
fail("Exception thrown");
}
}
use of org.nhindirect.config.service.impl.ConfigurationServiceImpl in project nhin-d by DirectProject.
the class ConfigurationServiceTest method testUpdateAddress.
/**
* Test the updateAddress method.
*/
public void testUpdateAddress() throws Exception {
final AddressService addressService = context.mock(AddressService.class);
final Address address = new Address(new Domain("domain"), "address");
context.checking(new Expectations() {
{
oneOf(addressService).updateAddress(address);
}
});
ConfigurationServiceImpl service = new ConfigurationServiceImpl();
service.setAddressSvc(addressService);
try {
service.updateAddress(address);
} catch (Exception e) {
fail("Exception thrown");
}
}
use of org.nhindirect.config.service.impl.ConfigurationServiceImpl in project nhin-d by DirectProject.
the class ConfigurationServiceTest method testGetAddressCount.
/**
* Test the getAddressCount method.
*/
public void testGetAddressCount() throws Exception {
final AddressService addressService = context.mock(AddressService.class);
context.checking(new Expectations() {
{
oneOf(addressService).getAddressCount();
}
});
ConfigurationServiceImpl service = new ConfigurationServiceImpl();
service.setAddressSvc(addressService);
try {
service.getAddressCount();
} catch (Exception e) {
fail("Exception thrown");
}
}
Aggregations