Beispiel #1
0
        public void Settle_ReturnsRelatedSplit()
        {
            var splitStub = new Split {
                Id = 3, Name = "split to settle"
            };

            _splitRepositoryMock.Setup(r => r.GetById(3)).Returns(splitStub);

            _splitContactRepositoryMock.Setup(r => r.GetWithIncludedProperties(It.IsAny <Expression <Func <SplitContact, IEntity> > >(), It.IsAny <Expression <Func <SplitContact, bool> > >())).Returns(new List <SplitContact>());

            var settlement = _splitService.Settle(3);

            Assert.Equal(splitStub.Name, settlement.Split.Name);
        }
Beispiel #2
0
 public SettlementDto Settle([FromRoute] int id)
 {
     return(_mapper.Map <SettlementDto>(_splitService.Settle(id)));
 }