コード例 #1
0
        public void DetailExpense_CreatingDetailExpenseWithDateLessThanMinSQLDate_ReturnDetailExpenseIsInvalid()
        {
            //Arrange
            var vendor      = "Viaduct Steakhouse";
            var description = "development team’s project end celebration dinner";
            var date        = new DateTime(1752, 12, 31);

            //Act
            var expenseDetail = new ExpenseDetail(vendor, description, date);

            //Assert
            Assert.False(expenseDetail.IsValid());
        }
コード例 #2
0
        public void DetailExpense_CreatingDetailExpenseWithoutVendor_ReturnDetailExpenseIsInvalid()
        {
            //Arrange
            var vendor      = string.Empty;
            var description = "development team’s project end celebration dinner";
            var date        = new DateTime(2017, 4, 27);

            //Act
            var expenseDetail = new ExpenseDetail(vendor, description, date);

            //Assert
            Assert.False(expenseDetail.IsValid());
        }
コード例 #3
0
        public void DetailExpense_CreatingDetailExpenseWithoutDescription_ReturnDetailExpenseIsInvalid()
        {
            //Arrange
            var vendor      = "Viaduct Steakhouse";
            var description = string.Empty;
            var date        = new DateTime(2017, 4, 27);

            //Act
            var expenseDetail = new ExpenseDetail(vendor, description, date);

            //Assert
            Assert.False(expenseDetail.IsValid());
        }
コード例 #4
0
        public void DetailExpense_CreatingValidDetailExpense_ReturnDetailExpenseIsValid()
        {
            //Arrange
            var vendor      = "Viaduct Steakhouse";
            var description = "development team’s project end celebration dinner";
            var date        = new DateTime(2017, 4, 27);

            //Act
            var expenseDetail = new ExpenseDetail(vendor, description, date);

            //Assert
            Assert.True(expenseDetail.IsValid());
        }