Exemple #1
0
        public DepositDto SaveDeposit(DepositDto depositDto)
        {
            var mpDepositResult = _depositRepository.CreateDeposit(_mapper.Map <MpDeposit>(depositDto));
            var mappedObject    = _mapper.Map <DepositDto>(mpDepositResult);

            return(mappedObject);
        }
Exemple #2
0
        public void ShouldCreateDeposit()
        {
            // Arrange
            var processorTransferId = "1a2b3c";

            var mpDeposit = new MpDeposit
            {
                ProcessorTransferId = processorTransferId
            };

            var newMpDeposit = new MpDeposit
            {
                Id = 123,
                ProcessorTransferId = processorTransferId
            };

            _request.Setup(m => m.Create(It.IsAny <MpDeposit>())).Returns(newMpDeposit);

            // Act
            var result = _fixture.CreateDeposit(mpDeposit);

            // Assert
            Assert.Equal(processorTransferId, result.ProcessorTransferId);
        }