Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- A couple things:
- 1.
- Can't find test in conceptServiceTest for HibernateConceptDAO.deleteConceptWord - should be there right?
- 2.
- Test: purgeOrder_shouldDeleteObsThatReference() now gets NumberFormatException when added new code to
- to ensure that the obs and order are associated.
- @Test
- @Verifies(value = "should delete obs that references order", method = "shouldDeleteObsThatReference(Order)")
- public void purgeOrder_shouldDeleteObsThatReference() throws Exception {
- String uuid = "be3a4d7a-f9ab-47bb-aaad-bc0b452fcda4";
- executeDataSet(OBS_THAT_REFERENCE_DATASET_XML);
- Order ord = Context.getOrderService().getOrder(1);
- Assert.assertNotNull(ord);
- Obs obs = Context.getObsService().getObs(1);
- Assert.assertNotNull(obs);
- Integer ordOrderId = ord.getOrderId();
- int orderOrderId = ordOrderId.intValue();
- Order obsOrder = Context.getObsService().getObs(1).getOrder();
- String s = String.valueOf(obsOrder);
- // gets NumberFormatException
- int obsOrd = Integer.parseInt(s);
- Assert.assertEquals(orderOrderId, obsOrd);
- Context.getOrderService().purgeOrder(ord, true);
- Obs obs1 = Context.getObsService().getObsByUuid(uuid);
- Assert.assertNull(obs1);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement