use of org.nhindirect.config.service.impl.CertificateGetOptions in project nhin-d by DirectProject.
the class ConfigurationServiceTest method testListAnchors.
/**
* Test the listAnchors method.
*/
public void testListAnchors() throws Exception {
final AnchorService anchorService = context.mock(AnchorService.class);
final long lastAnchorId = 3L;
final int maxResults = 3;
final CertificateGetOptions options = CertificateGetOptions.DEFAULT;
context.checking(new Expectations() {
{
oneOf(anchorService).listAnchors(lastAnchorId, maxResults, options);
}
});
ConfigurationServiceImpl service = new ConfigurationServiceImpl();
service.setAnchorSvc(anchorService);
try {
service.listAnchors(lastAnchorId, maxResults, options);
} catch (Exception e) {
fail("Exception thrown");
}
}
use of org.nhindirect.config.service.impl.CertificateGetOptions in project nhin-d by DirectProject.
the class ConfigurationServiceTest method testGetAnchor.
/**
* Test the getAnchor method.
*/
public void testGetAnchor() throws Exception {
final AnchorService anchorService = context.mock(AnchorService.class);
final String owner = "owner";
final String thumbprint = "thumbprint";
final CertificateGetOptions options = CertificateGetOptions.DEFAULT;
context.checking(new Expectations() {
{
oneOf(anchorService).getAnchor(owner, thumbprint, options);
}
});
ConfigurationServiceImpl service = new ConfigurationServiceImpl();
service.setAnchorSvc(anchorService);
try {
service.getAnchor(owner, thumbprint, options);
} catch (Exception e) {
fail("Exception thrown");
}
}
use of org.nhindirect.config.service.impl.CertificateGetOptions in project nhin-d by DirectProject.
the class ConfigurationServiceTest method testGetAnchors.
/**
* Test the getAnchors method.
*/
public void testGetAnchors() throws Exception {
final AnchorService anchorService = context.mock(AnchorService.class);
final Collection<Long> anchorIds = Arrays.asList(3L, 4L);
final CertificateGetOptions options = CertificateGetOptions.DEFAULT;
context.checking(new Expectations() {
{
oneOf(anchorService).getAnchors(anchorIds, options);
}
});
ConfigurationServiceImpl service = new ConfigurationServiceImpl();
service.setAnchorSvc(anchorService);
try {
service.getAnchors(anchorIds, options);
} catch (Exception e) {
fail("Exception thrown");
}
}
use of org.nhindirect.config.service.impl.CertificateGetOptions in project nhin-d by DirectProject.
the class ConfigurationServiceTest method testGetIncomingAnchors.
/**
* Test the getIncomingAnchors method.
*/
public void testGetIncomingAnchors() throws Exception {
final AnchorService anchorService = context.mock(AnchorService.class);
final String owner = "owner";
final CertificateGetOptions options = CertificateGetOptions.DEFAULT;
context.checking(new Expectations() {
{
oneOf(anchorService).getIncomingAnchors(owner, options);
}
});
ConfigurationServiceImpl service = new ConfigurationServiceImpl();
service.setAnchorSvc(anchorService);
try {
service.getIncomingAnchors(owner, options);
} catch (Exception e) {
fail("Exception thrown");
}
}
use of org.nhindirect.config.service.impl.CertificateGetOptions in project nhin-d by DirectProject.
the class ConfigurationServiceTest method testGetOutgoingAnchors.
/**
* Test the getOutgoingAnchors method.
*/
public void testGetOutgoingAnchors() throws Exception {
final AnchorService anchorService = context.mock(AnchorService.class);
final String owner = "owner";
final CertificateGetOptions options = CertificateGetOptions.DEFAULT;
context.checking(new Expectations() {
{
oneOf(anchorService).getOutgoingAnchors(owner, options);
}
});
ConfigurationServiceImpl service = new ConfigurationServiceImpl();
service.setAnchorSvc(anchorService);
try {
service.getOutgoingAnchors(owner, options);
} catch (Exception e) {
fail("Exception thrown");
}
}
Aggregations