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); }
public SettlementDto Settle([FromRoute] int id) { return(_mapper.Map <SettlementDto>(_splitService.Settle(id))); }