package de.superx.stat; import static org.junit.Assert.assertEquals; import org.junit.Test; public class StudentStatistics2016Test { private StudentStatistics2016 studentStatistics2016 = new StudentStatistics2016(); /* test, if field access of 'StudentStatistics2016' works properly - i.e. some fields may be set and some don't */ @Test public void testGetString() { this.studentStatistics2016.set("BERICHTSEINHEITID", "08154711"); assertEquals("Check existing field 'BERICHTSEINHEITID'","08154711",this.studentStatistics2016.getString("BERICHTSEINHEITID")); this.studentStatistics2016.set("EF1", "03"); assertEquals("Check existing field 'EF1'","03",this.studentStatistics2016.getString("EF1")); this.studentStatistics2016.set("EF125", "7"); assertEquals("Check last field student statistics 'EF125'","7",this.studentStatistics2016.getString("EF125")); this.studentStatistics2016.set("EF126", "082"); assertEquals("Check first field examination statistics 'EF126'",null,this.studentStatistics2016.getString("EF126")); this.studentStatistics2016.set("EF199", "A"); assertEquals("Check existing field 'EF199'",null,this.studentStatistics2016.getString("EF199")); this.studentStatistics2016.set("EF200", "asdf"); assertEquals("Check existing field 'EF200'",null,this.studentStatistics2016.getString("EF200")); } }