Exemplo n.º 1
0
        public void IsTollFreeVehicle()
        {
            bool testResult = new CongestionTaxCalculator().IsTollFreeVehicle(new Car());

            Assert.AreEqual(testResult, false, "Car Test failed.");

            testResult = new CongestionTaxCalculator().IsTollFreeVehicle(new Motorcycle());
            Assert.AreEqual(testResult, true, "Motorcycle Test failed.");
        }
Exemplo n.º 2
0
        public void IsTollFreeDate()
        {
            var testNr = 0;

            foreach (var test in IsTollFreeDateScenarios)
            {
                testNr++;
                bool testResult = new CongestionTaxCalculator().IsTollFreeDate(test.Date);
                Assert.AreEqual(testResult, test.TollFree, string.Format("Test {0} failed.", testNr));
            }
        }
Exemplo n.º 3
0
        public void GetTax_Car()
        {
            var testNr = 0;

            foreach (var test in getTaxScenarios)
            {
                testNr++;
                int testResult = new CongestionTaxCalculator().GetTax(new Car(), test.Dates);
                Assert.AreEqual(testResult, test.Result.Car, string.Format("Test {0} failed.", testNr));
            }
        }