public void TestCompleteRoutineStepReturnsBool() { // Arrange bool expectedResult = true; bool actualResult; RoutineStep routineStep = new RoutineStep(1, "FirstRoutine", "FirstStep", "The First Step", new DateTime(2021, 2, 26), 1, true); // Act actualResult = _routineManager.CompleteRoutineStep(routineStep, new UserAccount(3, "Client", "Client", "Client", "*****@*****.**", true)); // Assert Assert.AreEqual(expectedResult, actualResult); }
private void btnCompleteStep_Click(object sender, RoutedEventArgs e) { if ((_currentRoutineStep + 1) == _routine.Steps.Count()) { // Handle completing the routine } else { if (_routineManager.CompleteRoutineStep(_routine.Steps[_currentRoutineStep], _user)) { // Handle moving to the next step _currentRoutineStep++; UpdateRoutineStepInformation(); } } }