Esempio n. 1
0
        public void ShouldHaveErrors_name_isEmpty()
        {
            var command   = CommandFactory.AddProduct(" ", "descr", 1, 12);
            var validator = new AddProductCommandValidator();

            validator.ShouldHaveValidationErrorFor(c => c.Name, command);
        }
        public void Name_is_empty_fail()
        {
            var product = new AddProductCommand("", string.Empty, decimal.Zero);

            validator.ShouldHaveValidationErrorFor(p => p.Name, product);
        }