Beispiel #1
0
        public void CheckEnrolleeTest()
        {
            DbMgr Mgr;

            Mgr = DbMgr.Instance;
            PrimaryEnrollee e = new PrimaryEnrollee("0");

            e.FirstName = "A";
            e.LastName  = "B";
            e.SSN       = "123456778";

            Mgr.SaveEnrollee(e);

            var  bill    = new BillController();
            bool notTrue = bill.CheckEnrollee("A");
            bool soTrue  = bill.CheckEnrollee("A B");

            Assert.IsFalse(notTrue);
            Assert.IsTrue(soTrue);
        }
Beispiel #2
0
        public void HSPCalculateTest()
        {
            DbMgr Mgr;

            Mgr = DbMgr.Instance;
            InsurancePlan p = new InsurancePlan();

            p.Type = "Basic";
            PrimaryEnrollee e  = new PrimaryEnrollee("0");
            EnrolleePlan    eP = new EnrolleePlan(e, p);

            Mgr.SaveEnrolleePlan(eP);


            var           bill = new BillController();
            List <String> s    = new List <String>();

            s.Add("Inpatient");
            s.Add("Inpatient");
            List <int> c = new List <int>();

            c.Add(2500);
            c.Add(1500);
            bill.CheckEnrollee("A B");
            bill.CheckPolicy(1);

            String[,] returnArr = new String[2, 4];
            returnArr           = bill.HSPCalculate(s, c, DateTime.Now);

            Assert.AreEqual("2000", returnArr[0, 1]);
            Assert.AreEqual("560", returnArr[0, 2]);
            Assert.AreEqual("1440", returnArr[0, 3]);

            Assert.AreEqual("1500", returnArr[1, 1]);
            Assert.AreEqual("510", returnArr[1, 2]);
            Assert.AreEqual("990", returnArr[1, 3]);
        }