0% found this document useful (0 votes)
9 views1 page

Task Programming

The document outlines the creation of JUnit tests for the Event Reservation System, focusing on three methods: checkBookingCode, checkPasswordComplexity, and makeReservation. It specifies test cases for valid and invalid inputs for booking codes and passwords, as well as expected outcomes for the reservation process. The goal is to ensure the methods function correctly and provide appropriate feedback for different scenarios.

Uploaded by

Unahh Il
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views1 page

Task Programming

The document outlines the creation of JUnit tests for the Event Reservation System, focusing on three methods: checkBookingCode, checkPasswordComplexity, and makeReservation. It specifies test cases for valid and invalid inputs for booking codes and passwords, as well as expected outcomes for the reservation process. The goal is to ensure the methods function correctly and provide appropriate feedback for different scenarios.

Uploaded by

Unahh Il
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

You will create a JUnit test to verify the correctness of the Event Reservation System.

This
includes testing the following methods:

• checkBookingCode(String code)

• checkPasswordComplexity(String password)

• makeReservation(String bookingCode, String password)

Requirements:

1. Test Cases for checkBookingCode(String code):

o Test valid booking codes (e.g., "Event_123") and ensure the method returns true.

o Test invalid booking codes that:

▪ Do not contain an underscore (_).

▪ Exceed 12 characters.

2. Test Cases for checkPasswordComplexity(String password):

o Test valid passwords (e.g., "Password1@") and ensure the method returns true.

o Test invalid passwords that:

▪ Are shorter than 8 characters.

▪ Do not contain an uppercase letter.

▪ Do not contain a number.

▪ Do not contain a special character.

3. Test Cases for makeReservation(String bookingCode, String password):

o Ensure it returns the correct messages based on valid and invalid booking codes
and passwords:

▪ "Booking code is incorrectly formatted."

▪ "Password does not meet the complexity requirements."

▪ "Reservation successfully made!"

You might also like