Esempio n. 1
0
        public void CanLoadVehicleMakes()
        {
            var repo = new VehicleMakeRepository();

            var makes = repo.GetVehicleMakes().ToList();

            Assert.AreEqual(5, makes.Count());
            Assert.AreEqual("Ford", makes[0].VehicleMakeName);
            Assert.AreEqual(1, makes[0].VehicleMakeId);
        }
Esempio n. 2
0
        public void CanInsertVehicleMake()
        {
            var repo = new VehicleMakeRepository();

            MakesItem newMake = new MakesItem()
            {
                VehicleMakeName = "Subaru",
                UserId          = "00000000-0000-0000-0000-000000000000"
            };

            repo.Insert(newMake);

            var allMakes = repo.GetVehicleMakes().ToList();

            Assert.AreEqual(6, allMakes.Count());
            Assert.AreEqual("Subaru", allMakes[5].VehicleMakeName);
        }