use of ca.corefacility.bioinformatics.irida.web.controller.api.exception.GenericsException in project irida by phac-nml.
the class GenericControllerTest method testGetResource.
@Test
public void testGetResource() {
when(crudService.read(identifier)).thenReturn(entity);
ModelMap model = null;
try {
model = controller.getResource(identifier);
} catch (GenericsException e) {
fail();
}
assertTrue(model.containsKey("resource"));
IdentifiableTestEntity resource = (IdentifiableTestEntity) model.get("resource");
assertTrue(resource.getLink(Link.REL_SELF).getHref().endsWith(identifier.toString()));
}
Aggregations