Ejemplo n.º 1
0
        public ActionResult Update(AircraftViewModel model)
        {
            //update data
            string msg = _actypeService.Update(model);

            return(Json(new { Message = msg }, JsonRequestBehavior.AllowGet));
        }
        public void Update_Should_UpdateAircraftTypeInDatabase_When_Called()
        {
            var type    = _aircraftTypeService.GetAll().First();
            var oldName = type.AircraftModel;

            type.AircraftModel = "New Model";

            _aircraftTypeService.Update(type);
            Assert.AreNotEqual(type.AircraftModel, oldName);
        }
 public void Update_Should_CallRepositoryUpdate_When_Called()
 {
     _aircraftTypeService.Update(_type1DTO);
     A.CallTo(() => _fakeUnitOfWork.Set <AircraftType>().Update(A <AircraftType> .That.IsInstanceOf(typeof(AircraftType)), null)).MustHaveHappenedOnceExactly();
 }