Exemplo n.º 1
0
        public void IsValid_ShouldBeFalse_WhenRequiredFieldsAreNotSet()
        {
            var command = new CreateWeddingDescriptionCommand();

            var validator = new CreateWeddingDescriptionCommandValidator(Context);

            var result = validator.Validate(command);

            result.IsValid.ShouldBe(false);
        }
Exemplo n.º 2
0
        public void IsValid_ShouldBeTrue_WhenRequiredFieldsAreSet()
        {
            var command = new CreateWeddingDescriptionCommand
            {
                GroomDescription          = "test",
                BrideDescription          = "test",
                CeremonyDateTimeLocation  = "test",
                CeremonyDescription       = "test",
                ReceptionDateTimeLocation = "test",
                ReceptionDescription      = "test"
            };

            var validator = new CreateWeddingDescriptionCommandValidator(Context);

            var result = validator.Validate(command);

            result.IsValid.ShouldBe(true);
        }