@Test public void testUpdateWithOneLegAddsOneLegToSurvey() { Leg leg = new Leg(5, 0, 0); Survey survey = new Survey("Test Survey"); SurveyUpdater.update(survey, leg); Assert.assertEquals(survey.getAllLegs().size(), 1); }
public static boolean update(Survey survey, List<Leg> legs, InputMode inputMode) { boolean anyStationsAdded = false; for (Leg leg : legs) { anyStationsAdded = anyStationsAdded || update(survey, leg, inputMode); } return anyStationsAdded; }
SurveyUpdater { public static boolean update(Survey survey, List<Leg> legs, InputMode inputMode) { boolean anyStationsAdded = false; for (Leg leg : legs) { anyStationsAdded = anyStationsAdded || update(survey, leg, inputMode); } return anyStationsAdded; } }
SurveyUpdater { public static boolean update(Survey survey, List<Leg> legs, InputMode inputMode) { boolean anyStationsAdded = false; for (Leg leg : legs) { anyStationsAdded = anyStationsAdded || update(survey, leg, inputMode); } return anyStationsAdded; }  }
SurveyUpdater { public static boolean update(Survey survey, List<Leg> legs, InputMode inputMode) { boolean anyStationsAdded = false; for (Leg leg : legs) { anyStationsAdded = anyStationsAdded || update(survey, leg, inputMode); } return anyStationsAdded; }  static boolean update(Survey survey, List<Leg> legs, InputMode inputMode); static boolean update(Survey survey, List<Leg> legs); static boolean update(Survey survey, Leg leg); static synchronized boolean update(Survey survey, Leg leg, InputMode inputMode); static void updateWithNewStation(Survey survey, Leg leg); static void upgradeSplayToConnectedLeg(Survey survey, Leg leg, InputMode inputMode); static synchronized void editLeg(
            final Survey survey, final Leg toEdit, final Leg edited); static void renameStation(Survey survey, Station station, String name); static void moveLeg(Survey survey, Leg leg, Station newSource); static void deleteStation(final Survey survey, final Station toDelete); static void deleteSplay(Survey survey, Station station, Leg splay); static boolean areLegsBacksights(Leg fore, Leg back); static Leg averageLegs(List<Leg> repeats); static Leg averageBacksights(Leg fore, Leg back); static void reverseLeg(final Survey survey, final Station toReverse); static void setDirectionOfSubtree(Survey survey, Station station, Direction direction); }
SurveyUpdater { public static boolean update(Survey survey, List<Leg> legs, InputMode inputMode) { boolean anyStationsAdded = false; for (Leg leg : legs) { anyStationsAdded = anyStationsAdded || update(survey, leg, inputMode); } return anyStationsAdded; }  static boolean update(Survey survey, List<Leg> legs, InputMode inputMode); static boolean update(Survey survey, List<Leg> legs); static boolean update(Survey survey, Leg leg); static synchronized boolean update(Survey survey, Leg leg, InputMode inputMode); static void updateWithNewStation(Survey survey, Leg leg); static void upgradeSplayToConnectedLeg(Survey survey, Leg leg, InputMode inputMode); static synchronized void editLeg(
            final Survey survey, final Leg toEdit, final Leg edited); static void renameStation(Survey survey, Station station, String name); static void moveLeg(Survey survey, Leg leg, Station newSource); static void deleteStation(final Survey survey, final Station toDelete); static void deleteSplay(Survey survey, Station station, Leg splay); static boolean areLegsBacksights(Leg fore, Leg back); static Leg averageLegs(List<Leg> repeats); static Leg averageBacksights(Leg fore, Leg back); static void reverseLeg(final Survey survey, final Station toReverse); static void setDirectionOfSubtree(Survey survey, Station station, Direction direction);  }