Bug 639

Summary: Java Null Exception when view the Application that is empty
Product: 2021 CS3343 Hall Admission System Reporter: amble3232
Component: System SectionAssignee: newbie <chpang22-c>
Status: RESOLVED INVALID    
Severity: normal    
Priority: ---    
Version: unspecified   
Hardware: PC   
OS: Windows   

Description amble3232 2021-12-04 15:59:54 HKT
Background:
I am doing the unit test in ECLIPSE 2021-06 (4.20.0) on method viewApplication() in HallSystem class.
When I am doing testViewApplication2() in testHallSystem class, I am trying to test finding an std2’s application but there is no std2’ application.

Steps to Reproduce:
1. Run the package with testHall_Admission
2. Run the method “void testViewApplication2” in testHallSystem class

Actual result:
The system output the error message of “java.lang.NullPointerException: Cannot invoke “HallAdmissionSystem.Application.toString()” because the return value of “HallAdmissionSystem.HallSystem.findApplication(HallAdmissionSystem.Student)” is null” in the console after the test run.