Exemplo n.º 1
0
        public void Given_TodayIsBetweenStartDateAndEndDate_When_IsValidIsCalled_Then_ShouldReturnTrue()
        {
            //Arrange
            Product product = new Product(1, "Paine", "Se mananca", DateTime.Parse("1/1/2009"), DateTime.Parse("1/1/2020"), 100, 20);

            //Act
            bool isValid = product.IsValid();

            //Assert
            Assert.IsTrue(isValid);
        }
Exemplo n.º 2
0
        public void Given_TodayIsAfterEndDate_When_IsValidIsCalled_Then_ShouldReturnFalse()
        {
            //Arrange
            Product product = new Product(1, "Paine", "Se mananca", DateTime.Parse("1/1/2009"), DateTime.Parse("1/1/2015"), 100, 20);

            //Act
            bool isValid = product.IsValid();

            //Assert
            Assert.IsFalse(isValid);
        }