use of me.vertretungsplan.objects.SubstitutionScheduleData in project substitution-schedule-parser by vertretungsplanme.
the class LegionBoardDemoTest method setUp.
@Before
public void setUp() throws JSONException {
changes = new JSONArray(readResource("/legionboard/changes.json"));
teachers = new JSONArray(readResource("/legionboard/teachers.json"));
courses = new JSONArray(readResource("/legionboard/courses.json"));
SubstitutionScheduleData scheduleData = new SubstitutionScheduleData();
scheduleData.setData(new JSONObject());
parser = new LegionBoardParser(scheduleData, null);
DateTimeUtils.setCurrentMillisFixed(new LocalDate(2016, 9, 2).toDateTimeAtStartOfDay().getMillis());
}
use of me.vertretungsplan.objects.SubstitutionScheduleData in project substitution-schedule-parser by vertretungsplanme.
the class SVPlanDemoTest method setUp.
@Before
public void setUp() throws JSONException {
html1 = readResource("/svplan/svplan1.html");
html2 = readResource("/svplan/svplan2.html");
html3 = readResource("/svplan/svplan3.html");
html4 = readResource("/svplan/svplan4.html");
SubstitutionScheduleData scheduleData = new SubstitutionScheduleData();
scheduleData.setData(new JSONObject());
SubstitutionScheduleData scheduleData2 = new SubstitutionScheduleData();
scheduleData2.setData(new JSONObject("{\"repeatClass\": false}"));
parser = new SVPlanParser(scheduleData, null);
parserWithoutRepeat = new SVPlanParser(scheduleData2, null);
}
use of me.vertretungsplan.objects.SubstitutionScheduleData in project substitution-schedule-parser by vertretungsplanme.
the class SVPlanTest method setUp.
@Before
public void setUp() throws JSONException {
SubstitutionScheduleData data = new SubstitutionScheduleData();
final JSONObject json = new JSONObject();
final JSONArray classes = new JSONArray();
classes.put("7a");
classes.put("8a");
classes.put("8b");
classes.put("9a");
classes.put("10a");
json.put("classes", classes);
data.setData(json);
data.setType(SubstitutionSchedule.Type.STUDENT);
parser = new SVPlanParser(data, null);
}
use of me.vertretungsplan.objects.SubstitutionScheduleData in project substitution-schedule-parser by vertretungsplanme.
the class UntisInfoDemoTest method setUp.
@Before
public void setUp() throws JSONException {
doc = Jsoup.parse(readResource("/untis-info/schedule1.html"));
scheduleData = new SubstitutionScheduleData();
scheduleData.setData(new JSONObject("{\"classesSeparated\": true }"));
scheduleData.setType(SubstitutionSchedule.Type.STUDENT);
parser = new UntisInfoParser(scheduleData, null);
}
use of me.vertretungsplan.objects.SubstitutionScheduleData in project substitution-schedule-parser by vertretungsplanme.
the class ColorProviderTest method testCustomColor.
@Test
public void testCustomColor() throws JSONException {
final SubstitutionScheduleData scheduleData = new SubstitutionScheduleData();
final JSONObject data = new JSONObject();
final JSONObject colors = new JSONObject();
final JSONArray values = new JSONArray();
values.put("Vertretung");
colors.put("#123456", values);
data.put("colors", colors);
scheduleData.setData(data);
final ColorProvider provider = new ColorProvider(scheduleData);
assertEquals("#123456", provider.getColor("Vertretung"));
}
Aggregations