We were given a jar file to do blackbox testing on the methods. I know one test is supposed to give us a runtime exception but I'm getting a null pointer exception. My question is do I have this setup correctly and do you guys know where I'm going wrong?
Imported JAR file into build path correctly?
I've never used Eclipse, but from your output it looks like everything is setup fine.
I'm not surprised by the
NullPointerExceptioneither; you calledaddCourse()and passednullinstead of aCourse.This is clearly homework. I don't know what your directions are, but if you don't expect that method to throw NPE, you probably shouldn't be putting nulls in there.
Since the exception you're looking for is
CourseOverlapException, you probably ought to try adding twoSingleLectureCourses that have overlapping time ranges.