コード例 #1
0
        public void AddDriverTooList_ShouldBeCorrect()
        {
            InsuranceRepository _driverData = new InsuranceRepository();

            DriverData driver    = new DriverData();
            DriverData driverTwo = new DriverData();

            _driverData.AddDriverToList(driver);
            _driverData.AddDriverToList(driverTwo);

            int actual   = _driverData.GetDriverData().Count;
            int expected = 2;

            Assert.AreEqual(expected, actual);
        }
コード例 #2
0
        public void AddDriverToList()
        {
            InsuranceRepository _insuranceRepo = new InsuranceRepository();
            InsurancePoco       driverOne      = new InsurancePoco();
            InsurancePoco       driverTwo      = new InsurancePoco();
            InsurancePoco       driverThree    = new InsurancePoco();

            _insuranceRepo.AddDriverToList(driverOne);
            _insuranceRepo.AddDriverToList(driverTwo);
            _insuranceRepo.AddDriverToList(driverThree);

            int actual   = _insuranceRepo.GetInsuranceList().Count;
            int expected = 3;

            Assert.AreEqual(expected, actual);
        }