Search in sources :

Example 16 with SubstitutionScheduleData

use of me.vertretungsplan.objects.SubstitutionScheduleData in project substitution-schedule-parser by vertretungsplanme.

the class CSVDemoTest method setUp.

@Before
public void setUp() throws JSONException {
    csv = readResource("/csv/csv.csv");
    SubstitutionScheduleData scheduleData = new SubstitutionScheduleData();
    JSONObject data = new JSONObject();
    data.put("skipLines", 1);
    data.put("separator", "\\|");
    JSONArray columns = new JSONArray();
    columns.put("ignore").put("day").put("stand").put("class").put("lesson").put("subject").put("teacher").put("room").put("desc-type");
    data.put("columns", columns);
    data.put("classes", new JSONArray());
    scheduleData.setData(data);
    parser = new CSVParser(scheduleData, null);
}
Also used : SubstitutionScheduleData(me.vertretungsplan.objects.SubstitutionScheduleData) JSONObject(org.json.JSONObject) JSONArray(org.json.JSONArray) Before(org.junit.Before)

Aggregations

SubstitutionScheduleData (me.vertretungsplan.objects.SubstitutionScheduleData)16 JSONObject (org.json.JSONObject)15 Before (org.junit.Before)9 JSONArray (org.json.JSONArray)6 Test (org.junit.Test)5 LocalDate (org.joda.time.LocalDate)4 SubstitutionSchedule (me.vertretungsplan.objects.SubstitutionSchedule)2 SubstitutionScheduleDay (me.vertretungsplan.objects.SubstitutionScheduleDay)1 NoAuthenticationData (me.vertretungsplan.objects.authentication.NoAuthenticationData)1 NotNull (org.jetbrains.annotations.NotNull)1 LocalDateTime (org.joda.time.LocalDateTime)1 Document (org.jsoup.nodes.Document)1