Module Main: Check the bidirectional association between Project-Task
📢 Problem description
Check the correct operation of the association between Project-Task (A project has multiple tasks and a task exists in only one project).
👮 Tests
-
Check adding a task to a project. -
Check removing a task from a project. -
Check the handshaking between the classes. -
Check that if a task is added to a new projetc, it shouls be removed from the old project.
✔ Solutions
- Write unit tests.
- Add the methods basicAddTask, basicRemoveTask to the interface IProject to break the loop of the bidirectional association.
- Add the method basicSetContainingProject to the interface ITask for the same reason.
- Implement the methods and ensure the handshaking between Project et task.