Exemplo n.º 1
0
        public async Task UpdateAutoTest()
        {
            var auto = await _target.GetByIdAsync(new GetAutoByIdRequest { Id = 1 });

            auto.Marke = "Cybertruck";
            var updatedAuto = _target.Update(auto);

            Assert.Equal(auto.Marke, updatedAuto.Marke);
        }
Exemplo n.º 2
0
        public async Task UpdateAutoTest()
        {
            // arrange
            string      newModel = "asdf";
            AutoRequest toUpdate = new AutoRequest {
                Id = 1
            };
            AutoDto car = _target.Get(toUpdate);

            // act
            car.Marke = newModel;
            _target.Update(car);

            // assert
            Assert.Equal(newModel, _target.Get(toUpdate).Marke);
        }
Exemplo n.º 3
0
        public async Task UpdateAutoTest()
        {
            // arrange
            int    autoUpdateId    = 2;
            string autoUpdateMarke = "VW Gold e";

            AutoDto autoUpdate = _target.Get(new AutoRequest {
                Id = autoUpdateId
            });

            autoUpdate.Marke = autoUpdateMarke;

            // act
            _target.Update(autoUpdate);
            AutoDto autoUpdated = _target.Get(new AutoRequest {
                Id = autoUpdateId
            });

            // assert
            CompareAutoDtos(autoUpdated, autoUpdateId, autoUpdateMarke, 120, AutoKlasse.Mittelklasse, 0);
        }