SuperX-Kernmodul
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

44 lines
1.5 KiB

package de.superx.stat;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
/**
* @version 1.1 change expected field length to 207
* @author hiber
*
* @version 1.2 rename class + add methods testFieldSetAndFieldLength() and
* testConstructor()
* @author hiber
*
*/
public class StudentAndExaminationStatistics2016Test {
private final int EXPECTED_FIELD_LENGTH = 207;
@Test
@SuppressWarnings({ "static-access" })
public void testFieldLengths() {
StudentAndExaminationStatistics2016 stat = new StudentAndExaminationStatistics2016();
assertTrue("Field length array has to exist", stat.hasFieldLengths());
assertEquals("Length of field length array", this.EXPECTED_FIELD_LENGTH, stat.fieldLength.length);
}
@Test
@SuppressWarnings("static-method")
public void testFieldSetAndFieldLength() {
int fieldSetSize = StudentAndExaminationStatistics2016.fieldSet.size();
int fieldLengthLength = StudentAndExaminationStatistics2016.fieldLength.length;
assertEquals("Size of fieldSet and fieldLength are equal", fieldSetSize, fieldLengthLength);
}
@Test
@SuppressWarnings("static-method")
public void testConstructor() {
StudentAndExaminationStatistics2016 studentAndExaminationStatistics2016 = new StudentAndExaminationStatistics2016();
assertEquals("DistributionType has been set correctly", DistributionType.COMPLETE2016,
studentAndExaminationStatistics2016.distributionType);
}
}