use of org.activityinfo.shared.dto.TargetDTO 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());
}
use of org.activityinfo.shared.dto.TargetDTO in project activityinfo by bedatadriven.
the class TargetTest method createTarget.
private TargetDTO createTarget() {
Date date1 = new Date();
Date date2 = new Date();
/*
* Create a new Target
*/
TargetDTO target = new TargetDTO();
target.setName("Target0071");
target.setDate1(date1);
target.setDate2(date2);
return target;
}
Aggregations