Esempio n. 1
0
        public void SmartRepo_CalculateFollowPen_ShouldBeCorrect()
        {
            SmartRepo repo = new SmartRepo();
            Smart     data = new Smart("car", true, true, true, true);

            data.Follow = true;

            int actual   = repo.CalculateFollowPen(true);
            int expected = 500;


            Assert.AreEqual(expected, actual);
        }
Esempio n. 2
0
        public void SmartRepo_CalculatePremTotal_ShouldBeCorrect()
        {
            SmartRepo smartRepo = new SmartRepo();
            Smart     cost      = new Smart();

            smartRepo.CalculateSpeedPen(true);
            smartRepo.CalculateLanePen(true);
            smartRepo.CalculateStopPen(true);
            smartRepo.CalculateFollowPen(true);


            int expected = smartRepo.CalculatePremTotal(10, 25, 7, 500);
            int actual   = 552;

            Assert.AreEqual(expected, actual);
        }