示例#1
0
        public void IsValid_ShouldBeFalse_WhenRequiredFieldsAreNotSet()
        {
            var command = new UpdateWeddingDescriptionCommand();

            var validator = new UpdateWeddingDescriptionCommandValidator(Context);

            var result = validator.Validate(command);

            result.IsValid.ShouldBe(false);
        }
示例#2
0
        public void IsValid_ShouldBeTrue_WhenRequiredFieldsAreSet()
        {
            var command = new UpdateWeddingDescriptionCommand
            {
                GroomDescription          = "test",
                BrideDescription          = "test",
                CeremonyDateTimeLocation  = "test",
                CeremonyDescription       = "test",
                ReceptionDateTimeLocation = "test",
                ReceptionDescription      = "test"
            };

            var validator = new UpdateWeddingDescriptionCommandValidator(Context);

            var result = validator.Validate(command);

            result.IsValid.ShouldBe(true);
        }