public void Remove_Should_DeleteAircraftFromDatabase_When_Called()
        {
            var oldCount = _aircraftService.GetAll().Count;
            var plane    = _aircraftService.GetAll().First();

            _aircraftService.Remove(plane.Id);
            var newCount = _aircraftService.GetAll().Count;

            Assert.Greater(oldCount, newCount);
        }
예제 #2
0
 public void Remove_Should_CallRepositoryRemove_When_Called()
 {
     _aircraftService.Remove(_aircraftId);
     A.CallTo(() => _fakeUnitOfWork.AircraftRepository.Delete(_aircraftId)).MustHaveHappenedOnceExactly();
 }