public void PassCheque_GetsNull_ChequeNotSaved() { ////Arrange var mockRepository = new Mock <IDBRepository>(); var chequeService = new ChequeService(mockRepository.Object); ////Act chequeService.PassCheque(null); ////Assert mockRepository.Verify(mock => mock.SaveCheque(It.IsAny <Cheque>()), Times.Never); }
public void PassCheque_GetsCheque_ChequeSavedInRepo() { ////Arrange var mockRepository = new Mock <IDBRepository>(); var chequeService = new ChequeService(mockRepository.Object); ////Act chequeService.PassCheque(new Cheque()); ////Assert mockRepository.Verify(mock => mock.SaveCheque(It.IsAny <Cheque>()), Times.Once); }