protected EPlan makePlanWithActivityNames(List<String> activityNames) { EPlan plan = PlanFactory.eINSTANCE.createEPlan(); for (String name : activityNames) { plan.getChildren().add(makeActivityNamed(name)); } return plan; }
protected EPlanChild getActivityNamed(EPlan plan, String name) { for (EPlanChild child : plan.getChildren()) { if (child.getName() == name) { return child; } } return null; }
private Date getDefaultDate() { TemporalMember temporalMember = plan.getMember(TemporalMember.class); Date startDate = temporalMember.getStartTime(); Amount<Duration> duration = temporalMember.getDuration(); Date defaultDate = new Date(); if (startDate != null && duration != null) { defaultDate = DateUtils.add(startDate, duration); } return defaultDate; }
protected void assertNamesEqual(String message, EPlan plan, String... expectedNames) { assertNamesEqual(message, plan.getChildren(), expectedNames); }
protected static void assertNamesEqual(String message, EPlan plan, List<String> expectedNames) { assertNamesEqual(message, plan.getChildren(), expectedNames); }