Lecture 13 - Assignment Brief
Lecture
Assignment Brief
1. Context:
o The University of Central Lancashire (UCLan) is converting the C&T
building into a "Smart Building."
o The system will control the building’s doors, lights, and fire alarm.
2. Objective:
o Using C# and NUnit, you are required to develop and unit test the
BuildingController class, responsible for managing the smart
systems in the building.
o You must adopt a Test Driven Development (TDD) approach.
BuildingController Class Responsibilities
1. Subsystems Management:
o LightManager
o DoorManager
o FireAlarmManager
2. Logging and Notifications:
o Logs changes to the building's state using a WebService object.
o Sends maintenance emails using an EmailService object.
Test Driven Development (TDD) Approach
1. RED: Write a test that fails initially because the desired functionality isn’t
implemented yet.
2. GREEN: Write just enough code to make the test pass.
3. REFACTOR: Clean up the code, ensuring it remains functional and passes
all tests.