public void NotEmpty_AddingNotEmptyList_ItAddsNotEmptyEnumerableValidation() { // Arrange var validation = new CompositeValidation <Person>(); // Act validation.NotEmpty("AnyGroupName", x => new List <object>()); // Assert validation.Validations.OfType <NotEmptyEnumerableValidation <object> >().Count().ShouldBe(1); }
public void NotEmpty_AddingNotEmptyString_ItAddsNotEmptyStringValidation() { // Arrange var validation = new CompositeValidation <Person>(); // Act validation.NotEmpty("AnyGroupName", x => x.FirstName); // Assert validation.Validations.OfType <NotEmptyStringValidation>().Count().ShouldBe(1); }