Exemplo n.º 1
0
        public void UpdateCarReturnsUpdatedCar()
        {
            using (var repo = new SQLCarRepository(options))
            {
                repo.CreateCar(CarToCreate);
            }


            using (var Repo = new SQLCarRepository(options))
            {
                var UpdatedCar = Repo.UpdateCar(CarToUpdate);

                UpdatedCar.Equals(ExpectedCar).ShouldBeTrue();
            }
        }
Exemplo n.º 2
0
        public void UpdateCarInDB()
        {
            using (var repo = new SQLCarRepository(options))
            {
                repo.CreateCar(CarToCreate);
            }

            using (var repo = new SQLCarRepository(options))
            {
                repo.UpdateCar(CarToUpdate);
            }

            using (var repo = new SQLCarRepository(options))
            {
                repo.Cars.Single().Equals(ExpectedCar).ShouldBeTrue();
            }
        }