Ejemplo n.º 1
0
        public void ForNullMoney_ShouldFailValidation()
        {
            // arrange
            var sut = new InvoiceLine(ValidProductName, null);

            // act
            var validationResult = sut.Validate();

            // assert
            validationResult.Should().ContainSingle(InvoiceLine.ValidationRules.Money.Name);
        }
Ejemplo n.º 2
0
        public void ForEmptyProductName_ShouldFailValidation()
        {
            // arrange
            var sut = new InvoiceLine(string.Empty, ValidMoney);

            // act
            var validationResult = sut.Validate();

            // assert
            validationResult.Should().ContainSingle(InvoiceLine.ValidationRules.ProductName.Name);
        }