public static void assertCashPoint(CashPoint expected, CashPoint actual) { assertOpenmrsMetadata(expected, actual); Assert.assertEquals(expected.getName(), actual.getName()); Assert.assertEquals(expected.getDescription(), actual.getDescription()); if (expected.getLocation() == null) { Assert.assertNull(actual.getLocation()); } else { Assert.assertEquals(expected.getLocation().getId(), actual.getLocation().getId()); } }
@Override protected void updateEntityFields(CashPoint cashPoint) { cashPoint.setName(cashPoint.getName() + " updated"); cashPoint.setDescription(cashPoint.getDescription() + " updated"); cashPoint.setLocation(Context.getLocationService().getLocation(0)); }