Ejemplo n.º 1
0
        public void TC14()
        {
            opendatasource();
            var TupleCompare = new Tuple <DateTime, DateTime, int, bool>(
                Convert.ToDateTime("4/1/2015"), Convert.ToDateTime("4/9/2015"),
                4, true);

            CostCalculation cc = new CostCalculation();

            Assert.AreEqual(TupleCompare, cc.CalPaymentPerPerson(4, xlWorkSheetFirst,
                                                                 xlWorkSheetSecond, xlWorkSheetThird));

            var TupleCompareServiceFees = new Tuple <DateTime, DateTime,
                                                     int, int, string, bool>(
                Convert.ToDateTime("4/1/2015"), Convert.ToDateTime("4/9/2015"),
                4, 80, "TK", true);

            Assert.AreEqual(TupleCompareServiceFees,
                            cc.calservicefees(Convert.ToDateTime("4/1/2015"), Convert.ToDateTime("4/9/2015"),
                                              4, "Emergency Department", xlWorkSheetSecond, xlWorkSheetThird));
            var TupleCompare10Europerday = new Tuple <DateTime, DateTime, int, int, string>(
                Convert.ToDateTime("4/1/2015"), Convert.ToDateTime("4/9/2015"),
                4, 80, "Partial Payment");

            Assert.AreEqual(TupleCompare10Europerday, cc.cal10euroeachday(Convert.ToDateTime("4/1/2015"),
                                                                          Convert.ToDateTime("4/9/2015"), 4));
            xlWorkBook.Close();
            xlApp.Quit();
            Marshal.ReleaseComObject(xlWorkBook);
        }
Ejemplo n.º 2
0
        public void TC05()
        {
            var TupleCompare = new Tuple <DateTime, DateTime, int, int, string>(
                DateTime.Now, DateTime.Now.AddDays(35), 4, 350, "Partial Payment");

            CostCalculation cc = new CostCalculation();

            Assert.AreEqual(TupleCompare, cc.cal10euroeachday(DateTime.Now,
                                                              DateTime.Now.AddDays(35), 4));
        }
Ejemplo n.º 3
0
        public void TC03()
        {
            var TupleCompare = new Tuple <DateTime, DateTime, int, int, string>(
                Convert.ToDateTime("4/1/2015"), Convert.ToDateTime("4/9/2015"),
                4, 80, "Partial Payment");

            CostCalculation cc = new CostCalculation();

            Assert.AreEqual(TupleCompare, cc.cal10euroeachday(Convert.ToDateTime("4/1/2015"),
                                                              Convert.ToDateTime("4/9/2015"), 4));
        }