Ejemplo n.º 1
0
		public void When_both_properties_are_present()
		{
			var condition = new InGroupCondition { GroupName = "group", SearchKey = "search" };

			condition
				.Validate()
				.ShouldBeEmpty();
		}
Ejemplo n.º 2
0
		public void When_both_values_are_missing()
		{
			var condition = new InGroupCondition { GroupName = null, SearchKey = null };

			condition
				.Validate()
				.Count()
				.ShouldBe(2);
		}
Ejemplo n.º 3
0
		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);
		}