@Test public void testJsonIsTranslatedToSurveyWithActiveStation() throws Exception { String json = "{\"active-station\":\"1\",\"connections\":{}}"; Survey testSurvey = BasicTestSurveyCreator.createStraightNorth(); testSurvey.setActiveStation(testSurvey.getStationByName("2")); MetadataTranslater.translateAndUpdate(null, testSurvey, json); Assert.assertEquals("1", testSurvey.getActiveStation().getName()); Assert.assertEquals(0, testSurvey.getConnectedSurveys().size()); }
public static void translateAndUpdate(Context context, Survey survey, String string) throws Exception { Set<String> surveyNamesNotToLoad = new HashSet<>(); translateAndUpdate(context, survey, string, surveyNamesNotToLoad); }
MetadataTranslater { public static void translateAndUpdate(Context context, Survey survey, String string) throws Exception { Set<String> surveyNamesNotToLoad = new HashSet<>(); translateAndUpdate(context, survey, string, surveyNamesNotToLoad); } }
MetadataTranslater { public static void translateAndUpdate(Context context, Survey survey, String string) throws Exception { Set<String> surveyNamesNotToLoad = new HashSet<>(); translateAndUpdate(context, survey, string, surveyNamesNotToLoad); }  }
MetadataTranslater { public static void translateAndUpdate(Context context, Survey survey, String string) throws Exception { Set<String> surveyNamesNotToLoad = new HashSet<>(); translateAndUpdate(context, survey, string, surveyNamesNotToLoad); }  static String translate(Survey survey); static void translateAndUpdate(Context context, Survey survey, String string); static void translateAndUpdate(
            Context context,
            Survey survey,
            String string,
            Set<String> surveyNamesNotToLoad); static JSONObject toJson(Survey survey); static List<JSONArray> toListOfArrays(JSONArray array); }
MetadataTranslater { public static void translateAndUpdate(Context context, Survey survey, String string) throws Exception { Set<String> surveyNamesNotToLoad = new HashSet<>(); translateAndUpdate(context, survey, string, surveyNamesNotToLoad); }  static String translate(Survey survey); static void translateAndUpdate(Context context, Survey survey, String string); static void translateAndUpdate(
            Context context,
            Survey survey,
            String string,
            Set<String> surveyNamesNotToLoad); static JSONObject toJson(Survey survey); static List<JSONArray> toListOfArrays(JSONArray array); static final String CONNECTIONS_TAG; static final String ACTIVE_STATION_TAG; }