示例#1
0
        public void CustomerNameMustBePopulated()
        {
            var inputs  = new QuoteInputs();
            var results = inputs.Validate(inputs);

            results.IsValid.Should().BeFalse();
            results.Errors.Select(i => i.ErrorMessage).Should().Contain("Customer must provide a name.");
        }
示例#2
0
        public void DeliveryDateCanNotBeInthePast()
        {
            var inputs = new QuoteInputs()
            {
                DeliveryDate = DateTime.Now.AddDays(-1)
            };

            var results = inputs.Validate(inputs);

            results.IsValid.Should().BeFalse();
            results.Errors.Select(i => i.ErrorMessage).Should().Contain("Delivery date cannot be in the past.");
        }