| Summary: | Exception when create appointment with invalid date or time | ||
|---|---|---|---|
| Product: | 2023 CS3343 Group 20 System | Reporter: | mhlee64-c |
| Component: | Appointment | Assignee: | hfwong56-c |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | --- | ||
| Version: | unspecified | ||
| Hardware: | PC | ||
| OS: | Windows | ||
| Attachments: | Test case for invalid date time when create appointment | ||
Created attachment 161 [details] Test case for invalid date time when create appointment it is expected for the user to enter date in DD/MM/YYYY format and time in HH:MM:SS format when creating appointment, but when the user input an invalid date or invalid time, instead of asking the user to input again, exception occur. -------------------------------------------------------------------------------- Welcome to CMS! ============================================== Login =============================================== Please enter your staff ID: n Please enter your password: n ============================================ Main Menu ============================================= Login as [Nurse] dummy Nurse | n | 0. Patient Mangement 1. Appointment Management 2. MedRecord Management 3. Medicine Management 4. Admin 5. Logoff Please select a function: 1 ====================================== Appointment Mangement ======================================= 0. View Appointment History 1. View Pending Appointment 2. Create Appointment 3. Update Appointment Status 4. Earliest next Appointment Please select a function: 2 ========================================== Select Patient ========================================== Please input patient's HKID: a123456 [Patient] Dummy patient | M | a123456 | 2020-06-29 | ======================================== Create appointment ======================================== Please enter the date (DD/MM/YYYY): 1 Please enter the time (HH:MM:SS): 1 ============================================== ERROR =============================================== java.lang.NullPointerException: Cannot invoke "java.time.LocalDate.atTime(java.time.LocalTime)" because "date" is null