public void RemoveGroupCourseViewModel_Validate_returns_error_when_confirm_is_false() { // Given var model = new RemoveGroupCourseViewModel(); // When var result = model.Validate(new ValidationContext(model)).ToList(); // Then result.Should().NotBeEmpty(); result.ElementAt(0).ErrorMessage.Should().Be("Confirm you wish to remove this course"); }
public void RemoveGroupCourseViewModel_Validate_does_not_return_error_when_confirm_is_true() { // Given var model = new RemoveGroupCourseViewModel { Confirm = true, }; // When var result = model.Validate(new ValidationContext(model)); // Then result.Should().BeEmpty(); }