public void Add_Should_StoreAircraftInDatabase_When_Called()
        {
            var oldCount = _aircraftService.GetAll().Count;

            _aircraftService.Add(_plane);
            var newCount = _aircraftService.GetAll().Count;

            Assert.Greater(newCount, oldCount);
        }
コード例 #2
0
 public void Add_Should_CallRepositoryCreate_When_Called()
 {
     _aircraftService.Add(_plane1DTO);
     A.CallTo(() => _fakeUnitOfWork.AircraftRepository.Create(A <Aircraft> .That.IsInstanceOf(typeof(Aircraft)), null)).MustHaveHappenedOnceExactly();
 }