예제 #1
0
        public void ShouldHaveErrors_Name_IsEmpty()
        {
            var command   = CommandFactory.EditProductCommand(1, " ", "Description", 1, 189m);
            var validator = new EditProductCommandValidator();

            validator.ShouldHaveValidationErrorFor(c => c.Name, command);
        }
예제 #2
0
        public void ShouldHaveErrors_Id_lessThenOne(int id)
        {
            var command   = CommandFactory.EditProductCommand(id, "Name", "Description", 1, 189m);
            var validator = new EditProductCommandValidator();

            validator.ShouldHaveValidationErrorFor(c => c.Id, command);
        }