public void TestCreateDeposit() { var dto = new DepositDTO { AccountNumber = "8675309", BatchCount = 5, DepositDateTime = DateTime.Now, DepositName = "deposit name", DepositTotalAmount = 456.78M, Exported = true, Notes = "blah blah blah", ProcessorTransferId = "transfer 1", Id = 123 // should be overwritten in service }; _mpDonationService.Setup( mocked => mocked.CreateDeposit(dto.DepositName, dto.DepositTotalAmount, dto.DepositAmount, dto.ProcessorFeeTotal, dto.DepositDateTime, dto.AccountNumber, dto.BatchCount, dto.Exported, dto.Notes, dto.ProcessorTransferId)).Returns(987); var response = _fixture.CreateDeposit(dto); _mpDonationService.VerifyAll(); Assert.AreSame(dto, response); Assert.AreEqual(987, response.Id); }
public DepositDTO CreateDeposit(DepositDTO deposit) { deposit.Id = _mpDonationService.CreateDeposit(deposit.DepositName, deposit.DepositTotalAmount, deposit.DepositAmount, deposit.ProcessorFeeTotal, deposit.DepositDateTime, deposit.AccountNumber, deposit.BatchCount, deposit.Exported, deposit.Notes, deposit.ProcessorTransferId); return (deposit); }