You are on page 1of 7

Informal test plan (Explanatory Testing)

Application Name: CALENDAR APPLICATION

Objective: To make

Test Plan for CalendarTest Class

Objective:

The objective of this test plan is to verify the correctness and robustness of the Calendar class and its
associated methods.

Test Cases:

Adding a Meeting on a Holiday:

Description: Verify that a meeting can be added on a holiday.

Input: Month: 2, Day: 16, Description: "Janan Luwum"

Expected Output: The calendar should mark February 16th as busy.

Checking Busy Status for a Non-Busy Time Frame:

Description: Verify that the isBusy method returns false for a time frame that is not busy.

Input: Month: 11, Day: 1, Start Time: 0, End Time: 23

Expected Output: The calendar should not be busy for the specified time frame.

Checking Busy Status for a Busy Time Frame:

Description: Verify that the isBusy method returns true for a time frame that is busy.

Input: Add a meeting on January 1st from 8 AM to 9 AM, then check the calendar's busy status for the
same time frame.

Expected Output: The calendar should be busy for the specified time frame.

Validating Date and Time Ranges:

Description: Test the checkTimes method with valid date and time ranges.
Input: Month: 2, Day: 18, Start Time: 9, End Time: 23

Expected Output: The method should not throw any exception.

Validating Invalid Date:

Description: Test the checkTimes method with an invalid date.

Input: Month: 13, Day: 39, Start Time: 0, End Time: 23

Expected Output: The method should throw a TimeConflictException with the message "Day does not
exist."

Validating Invalid Time Ranges:

Description: Test the checkTimes method with invalid time ranges.

Input: Month: 1, Day: 1, Start Time: 47, End Time: 23

Expected Output: The method should throw a TimeConflictException for the invalid time range.

Validating Start Time After End Time:

Description: Test the checkTimes method with a start time after the end time.

Input: Month: 2, Day: 1, Start Time: 23, End Time: 0

Expected Output: The method should throw a TimeConflictException for the start time after the end
time.

Printing Agenda for a Month with Meetings:

Description: Test the printAgenda method for a month with meetings.

Input: Add meetings for March 1st and March 4th, then print the agenda for March.

Expected Output: The printed agenda should match the expected agenda string.

Adding a Meeting to an Empty Day:

Description: Test adding a meeting to a day without any existing meetings.

Input: Month: 1, Day: 1, Description: "Team Meeting"

Expected Output: The meeting should be successfully added to the calendar.


Adding a Meeting to a Day with an Existing Meeting:

Description: Test adding a meeting to a day that already has a meeting.

Input: Add a meeting on January 1st, then try to add another meeting to the same day.

Expected Output: The method should throw a TimeConflictException for adding a meeting to a day that
already has a meeting.

Removing a Meeting That Exists:

Description: Test removing a meeting that exists in the calendar.

Input: Add a meeting on January 1st and then remove it.

Expected Output: The meeting should be successfully removed from the calendar.

Removing a Meeting That Does Not Exist:

Description: Test removing a meeting that does not exist in the calendar.

Input: Try to remove a non-existent meeting.

Expected Output: The method should not throw any exception.

TimeConflictException Handling:

Description: Test that TimeConflictException is thrown under the correct conditions.

Input: Various scenarios such as invalid dates, times, and adding a meeting to a day with an existing
meeting.

Expected Output: The methods should throw TimeConflictException when appropriate.

Handling Leap Year:

Description: Test adding a meeting on February 29th during a leap year.

Input: Add a meeting on February 29th during a leap year.

Expected Output: The calendar should mark February 29th as busy during a leap year.

Handling Month Boundaries:


Description: Test adding meetings on the

Test Plan for OrganizationTest Class

Objective:

The objective of this test plan is to verify the correctness and robustness of the Organization class and its
associated methods.

Test Cases:

Initialization Test:

Description: Verify that the organization is initialized properly with employees and rooms.

Input: Create an instance of the organization.

Expected Output: The organization should not be null, and it should contain the expected number of
employees and rooms.

Testing getEmployees() Method:

Description: Test getting the list of employees from the organization.

Input: Access the list of employees from the organization.

Expected Output: The list of employees should not be null, and it should contain the expected number
of employees.

Testing getRooms() Method:

Description: Test getting the list of rooms from the organization.

Input: Access the list of rooms from the organization.

Expected Output: The list of rooms should not be null, and it should contain the expected number of
rooms.

Testing getRoom(String id) Method:

Description: Test getting a specific room by its ID from the organization.

Input: Retrieve a room by its ID.

Expected Output: The retrieved room should not be null, and its ID should match the specified ID.
Testing getRoom(String id) Method for Non-Existent Room:

Description: Test getting a room that does not exist in the organization.

Input: Retrieve a room with a non-existent ID.

Expected Output: The method should throw an exception.

Testing getEmployee(String name) Method:

Description: Test getting a specific employee by their name from the organization.

Input: Retrieve an employee by their name.

Expected Output: The retrieved employee should not be null, and their name should match the specified
name.

Testing getEmployee(String name) Method for Non-Existent Employee:

Description: Test getting an employee who does not exist in the organization.

Input: Retrieve an employee with a non-existent name.

Expected Output: The method should throw an exception.

Note:

Each test case should be independent and should not rely on the state of the object modified by other
test cases.

Ensure thorough testing covering both valid and invalid inputs, boundary cases, and edge cases to
achieve comprehensive test coverage.

Test Plan for MeetingTest Class

Objective:

The objective of this test plan is to verify the correctness and robustness of the Meeting class and its
associated methods.

Test Cases:

Testing toString() Method:

Description: Verify that the toString() method returns the correct string representation of a meeting.
Input: Create a meeting with attendees and room details.

Expected Output: The string representation should match the expected format.

Testing addAttendee() Method:

Description: Test adding an attendee to a meeting.

Input: Add an attendee to a meeting.

Expected Output: The attendee should be added successfully to the meeting's attendee list.

Testing removeAttendee() Method:

Description: Test removing an attendee from a meeting.

Input: Remove an attendee from a meeting.

Expected Output: The attendee should be removed successfully from the meeting's attendee list.

Testing getMonth() Method:

Description: Test getting the month of a meeting.

Input: Set the month of a meeting.

Expected Output: The retrieved month should match the set month.

Testing getDay() Method:

Description: Test getting the day of a meeting.

Input: Set the day of a meeting.

Expected Output: The retrieved day should match the set day.

Testing getStartTime() Method:

Description: Test getting the start time of a meeting.

Input: Set the start time of a meeting.

Expected Output: The retrieved start time should match the set start time.

Testing getEndTime() Method:


Description: Test getting the end time of a meeting.

Input: Set the end time of a meeting.

Expected Output: The retrieved end time should match the set end time.

Testing getDescription() Method:

Description: Test getting the description of a meeting.

Input: Set the description of a meeting.

Expected Output: The retrieved description should match the set description.

Testing getRoom() Method:

Description: Test getting the room of a meeting.

Input: Set the room of a meeting.

Expected Output: The retrieved room should match the set room.

Boundary Testing:

Description: Test the behavior of methods at boundary conditions.

Inputs:

Set month, day, start time, end time, and description to their maximum and minimum allowed values.

Expected Output: The methods should handle these values correctly without throwing exceptions.

Note:

Each test case should be independent and should not rely on the state of the object modified by other
test cases.

Ensure thorough testing covering both valid and invalid inputs, boundary cases, and edge cases to
achieve comprehensive test coverage.

You might also like