public void _04_Creer_une_classe_ClosedState_avec_une_methode_Start_et_Close() { Task task = new Task(); ClosedState state = new ClosedState(); Assert.Equal("INVALID TRANSITION", state.Start(task)); Assert.Equal("INVALID TRANSITION", state.Close(task)); }
public void _05_Creer_une_interface_ITaskState_avec_une_methode_Start_et_Close_pour_unifier_TodoState_et_InProgressState_et_ClosedState() { Task task = new Task(); ITaskState todoState = new TodoState(); Assert.Equal("TODO -> IN PROGRESS", todoState.Start(task)); Assert.Equal("INVALID TRANSITION", todoState.Close(task)); ITaskState inProgressState = new InProgressState(); Assert.Equal("INVALID TRANSITION", inProgressState.Start(task)); Assert.Equal("IN PROGRESS -> CLOSED", inProgressState.Close(task)); ITaskState closedState = new ClosedState(); Assert.Equal("INVALID TRANSITION", closedState.Start(task)); Assert.Equal("INVALID TRANSITION", closedState.Close(task)); }