예제 #1
0
        public void UpdateCommand_ShouldNotHave_ValidationErrors()
        {
            _updateCommandValidator.ShouldNotHaveValidationErrorFor(x => x.Id, Guid.NewGuid());

            var ucWithGoodData = new UpdateCommand
            {
                Title       = "Title",
                Description = "Description"
            };

            var ucValidator = _updateCommandValidator.TestValidate(ucWithGoodData);

            ucValidator.ShouldNotHaveValidationErrorFor(x => x.Title);
            ucValidator.ShouldNotHaveValidationErrorFor(x => x.Description);
        }
예제 #2
0
 public void UpdateCommand_ShouldNotHave_ValidationErrors(string nameValue)
 {
     _updateCommandValidator.ShouldNotHaveValidationErrorFor(x => x.Id, Guid.NewGuid());
     _updateCommandValidator.ShouldNotHaveValidationErrorFor(x => x.Name, nameValue);
 }
예제 #3
0
 public void UpdateCommand_ShouldNotHave_ValidationErrors(double widthValue, double heightValue)
 {
     _updateCommandValidator.ShouldNotHaveValidationErrorFor(x => x.Id, Guid.NewGuid());
     _updateCommandValidator.ShouldNotHaveValidationErrorFor(x => x.Width, widthValue);
     _updateCommandValidator.ShouldNotHaveValidationErrorFor(x => x.Height, heightValue);
 }