import static org.junit.jupiter.api.Assertions.assertEquals;

import java.util.ArrayList;

import org.junit.jupiter.api.Test;

public class ThreeTest
{
    @Test
    public void testAgainstExample()
    {
        Attendance a = new Attendance();

        a.historyList = new ArrayList<CourseRecord>();
        a.historyList.add(new CourseRecord("rc29", 1));
        a.historyList.add(new CourseRecord("br98", 1));
        a.historyList.add(new CourseRecord("dr03", 2));
        a.historyList.add(new CourseRecord("ot32", 2));
        a.historyList.add(new CourseRecord("sq98", 3));
        a.historyList.add(new CourseRecord("ry00", 1));

        a.mathList = new ArrayList<CourseRecord>();
        a.mathList.add(new CourseRecord("fr27", 2));
        a.mathList.add(new CourseRecord("sq98", 1));
        a.mathList.add(new CourseRecord("dr03", 2));
        a.mathList.add(new CourseRecord("dk12", 1));
        a.mathList.add(new CourseRecord("ot32", 1));
        a.mathList.add(new CourseRecord("js33", 0));
        a.mathList.add(new CourseRecord("ry00", 3));

        assertEquals(2, a.moreHistoryThanMathAbsences());
    }
}
