use of org.activityinfo.shared.command.UpdateEntity in project activityinfo by bedatadriven.
the class TargetTest method updateTargetNameTest.
@Test
public void updateTargetNameTest() throws Throwable {
Map<String, Object> changes1 = new HashMap<String, Object>();
changes1.put("name", "newNameOfTarget");
execute(new BatchCommand(new UpdateEntity("Target", 1, changes1)));
List<TargetDTO> targets = execute(new GetTargets(db.getId())).getData();
TargetDTO dto = getTargetById(targets, 1);
Assert.assertEquals("newNameOfTarget", dto.getName());
}
Aggregations