コード例 #1
0
        public void AssertRebateAtAddedToRebateList()
        {
            DateTime                     dateInRange      = Convert.ToDateTime("06/03/2018");
            Product                      product          = new Product("Diapers", 2, 2.29);
            Tuple <Product, int>         transactionTuple = new Tuple <Product, int>(product, 1);
            List <Tuple <Product, int> > transactions     = new List <Tuple <Product, int> >();

            transactions.Add(transactionTuple);
            Transaction transaction = new Transaction(10, transactions);
            String      rebates     = RebateDB.AddRebateToList(transaction, dateInRange);

            Assert.AreNotEqual("Added To Rebate Database.", rebates);
        }
コード例 #2
0
        public void AssertRebateNotAddedToRebateListBecauseRebateDateAboveMailListRange()
        {
            DateTime                     dateAboveMailRange = Convert.ToDateTime("07/15/2018");
            Product                      product            = new Product("Diapers", 2, 2.29);
            Tuple <Product, int>         transactionTuple   = new Tuple <Product, int>(product, 1);
            List <Tuple <Product, int> > transactions       = new List <Tuple <Product, int> >();

            transactions.Add(transactionTuple);
            Transaction transaction = new Transaction(10, transactions);
            String      rebates     = RebateDB.AddRebateToList(transaction, dateAboveMailRange);

            Assert.AreNotEqual(rebates, "Cannot add Rebate, not within proper Dates.");
        }
コード例 #3
0
        public void AssertRebateNotAddedToRebateListBecauseRebateDateBelowRange()
        {
            DateTime                     dateInRange      = Convert.ToDateTime("05/30/2018");
            Product                      product          = new Product("Diapers", 2, 2.29);
            Tuple <Product, int>         transactionTuple = new Tuple <Product, int>(product, 1);
            List <Tuple <Product, int> > transactions     = new List <Tuple <Product, int> >();

            transactions.Add(transactionTuple);
            Transaction transaction = new Transaction(10, transactions);
            String      rebates     = RebateDB.AddRebateToList(transaction, dateInRange);

            Assert.AreNotEqual(rebates, "There are no checks to Generate");
        }