public void When_both_properties_are_present() { var condition = new InGroupCondition { GroupName = "group", SearchKey = "search" }; condition .Validate() .ShouldBeEmpty(); }
public void When_both_values_are_missing() { var condition = new InGroupCondition { GroupName = null, SearchKey = null }; condition .Validate() .Count() .ShouldBe(2); }
public void When_a_value_is_missing(string group, string search, string expectedMessage) { var condition = new InGroupCondition { GroupName = group, SearchKey = search }; condition .Validate() .ShouldHaveSingleItem() .ShouldContain(expectedMessage); }