@@ -0,0 +1,1957 @@
+/*%0A * substitution-schedule-parser - Java library for parsing schools' substitution schedules%0A * Copyright (c) 2017 Johan v. Forstner%0A *%0A * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.%0A * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.%0A */%0A%0Apackage me.vertretungsplan.objects.diff;%0A%0Aimport me.vertretungsplan.objects.Substitution;%0Aimport me.vertretungsplan.objects.SubstitutionScheduleDay;%0Aimport org.junit.Test;%0A%0Aimport java.util.Arrays;%0Aimport java.util.HashSet;%0A%0Aimport static org.junit.Assert.assertTrue;%0A%0Apublic class DiffTest %7B%0A    @Test%0A    public void testDiffSame() %7B%0A        Substitution s1 = new Substitution();%0A        s1.setClasses(new HashSet%3C%3E(Arrays.asList(new String%5B%5D%7B%2207B%22%7D)));%0A        s1.setLesson(%226%22);%0A        s1.setType(%22Enfall%22);%0A        s1.setSubject(%22Entfall%22);%0A        s1.setPreviousSubject(%22SPA%22);%0A        s1.setTeachers(new HashSet%3C%3E(Arrays.asList(new String%5B%5D%7B%22KW%22, %22ER%22%7D)));%0A        s1.setPreviousTeachers(new HashSet%3CString%3E());%0A        s1.setColor(%22#F44336%22);%0A        s1.setDesc(%22f%C3%A4llt aus%22);%0A%0A        Substitution s2 = new Substitution();%0A        s2.setClasses(new HashSet%3C%3E(Arrays.asList(new String%5B%5D%7B%2207B%22%7D)));%0A        s2.setLesson(%226%22);%0A        s2.setType(%22Enfall%22);%0A        s2.setSubject(%22Entfall%22);%0A        s2.setPreviousSubject(%22SPA%22);%0A        s2.setTeachers(new HashSet%3C%3E(Arrays.asList(new String%5B%5D%7B%22KW%22, %22ER%22%7D)));%0A        s2.setPreviousTeachers(new HashSet%3CString%3E());%0A        s2.setColor(%22#F44336%22);%0A        s2.setDesc(%22f%C3%A4llt aus%22);%0A%0A        assertTrue(s1.equals(s2));%0A%0A        SubstitutionScheduleDay d1 = new SubstitutionScheduleDay();%0A        d1.addSubstitution(s1);%0A        SubstitutionScheduleDay d2 = new SubstitutionScheduleDay();%0A        d2.addSubstitution(s2);%0A%0A        SubstitutionScheduleDayDiff dayDiff = SubstitutionScheduleDayDiff.compare(d1, d2);%0A        assertTrue(!dayDiff.isNotEmpty());%0A    %7D%0A%7D%0A

Add DiffTest