Esempio n. 1
0
        public void testInit()
        {
            NewAudi = new SUT.Auto()
            {
                VehicleIdentificationNumber = "07xxxxxxxxxxxxxxx", Year = "2020", Make = "Audi", Model = "A4", LocationOnLot = "B5"
            };
            cars = new List <SUT.Auto>()
            {
                new SUT.Auto {
                    VehicleIdentificationNumber = "01xxxxxxxxxxxxxxx", Year = "2008", Make = "Cadillac", Model = "CTS-V", LocationOnLot = "A5"
                },
                new SUT.Auto {
                    VehicleIdentificationNumber = "02xxxxxxxxxxxxxxx", Year = "1964", Make = "Dodge", Model = "Dart", LocationOnLot = "F3"
                },
                new SUT.Auto {
                    VehicleIdentificationNumber = "03xxxxxxxxxxxxxxx", Year = "1963", Make = "Cadillac", Model = "Fleetwood", LocationOnLot = "A23"
                },
                new SUT.Auto {
                    VehicleIdentificationNumber = "04xxxxxxxxxxxxxxx", Year = "1995", Make = "Hummer", Model = "H1 (Gas)", LocationOnLot = "C7"
                },
                new SUT.Auto {
                    VehicleIdentificationNumber = "05xxxxxxxxxxxxxxx", Year = "1958", Make = "Triumph", Model = "TR3", LocationOnLot = "A1"
                },
                new SUT.Auto {
                    VehicleIdentificationNumber = "06xxxxxxxxxxxxxxx", Year = "1968", Make = "Triumph", Model = "TR5", LocationOnLot = "A2"
                }
            };

            mock = new Mock <SUT.IAutoDBAccess>();
            mock.Setup(x => x.LoadLot()).Returns(cars);
            mock.Setup(x => x.SaveLot(cars)).Returns(true);
            autoControl = new SUT.AutoControl(mock.Object);
        }
Esempio n. 2
0
 public void testClean()
 {
     NewAudi     = null;
     mock        = null;
     autoControl = null;
     cars        = null;
 }
Esempio n. 3
0
 public void testClean()
 {
     DuplicateCar     = null;
     NewAudi          = null;
     NewCarSameLot    = null;
     NewCarInvalidVin = null;
     mock             = null;
     autoControl      = null;
     cars             = null;
 }