public void Remove_Should_DeleteAircraftTypeFromDatabase_When_Called()
        {
            var oldCount = _aircraftTypeService.GetAll().Count;
            var type     = _aircraftTypeService.GetAll().First();

            _aircraftTypeService.Remove(type.Id);
            var newCount = _aircraftTypeService.GetAll().Count;

            Assert.Greater(oldCount, newCount);
        }
コード例 #2
0
 public void Remove_Should_CallRepositoryRemove_When_Called()
 {
     _aircraftTypeService.Remove(_aircraftTypeId);
     A.CallTo(() => _fakeUnitOfWork.Set <AircraftType>().Delete(_aircraftTypeId)).MustHaveHappenedOnceExactly();
 }