public void Returns_error_message_with_replacements()
        {
            var requirement = new StringNotEmptyRequirement();

            requirement.Message = "xyz";
            Assert.Equal("xyz", requirement.Check(null).ToArray()[0].Message);
        }
		public void Returns_error_if_value_is_empty() {
			var requirement = new StringNotEmptyRequirement();
      Assert.NotEmpty(requirement.Check(""));
      Assert.NotEmpty(requirement.Check(" "));
      Assert.NotEmpty(requirement.Check("\t"));
      Assert.NotEmpty(requirement.Check("\n"));
    }
Exemplo n.º 3
0
        public void Returns_error_if_value_is_empty()
        {
            var requirement = new StringNotEmptyRequirement();

            Assert.NotEmpty(requirement.Check(""));
            Assert.NotEmpty(requirement.Check(" "));
            Assert.NotEmpty(requirement.Check("\t"));
            Assert.NotEmpty(requirement.Check("\n"));
        }
        public void Returns_error_if_value_is_null()
        {
            var requirement = new StringNotEmptyRequirement();

            Assert.NotEmpty(requirement.Check(null));
        }
        public void Returns_null_if_value_is_present_and_not_Empty()
        {
            var requirement = new StringNotEmptyRequirement();

            Assert.Empty(requirement.Check("1234"));
        }
		public void Returns_error_message_with_replacements() {
			var requirement = new StringNotEmptyRequirement();
			requirement.Message = "xyz";
			Assert.Equal("xyz", requirement.Check(null).ToArray()[0].Message);
		}
		public void Returns_error_if_value_is_null() {
			var requirement = new StringNotEmptyRequirement();
			Assert.NotEmpty(requirement.Check(null));
		}
		public void Returns_null_if_value_is_present_and_not_Empty() {
			var requirement = new StringNotEmptyRequirement();
			Assert.Empty(requirement.Check("1234"));
		}