public void List_ReturnsSplitsForUser() { var splitsStub = new List <Split> { new Split { Name = "Tomorrow" }, new Split { Name = "Yesterday" }, }; _splitRepositoryMock.Setup(r => r.Get(It.IsAny <Expression <Func <Split, bool> > >())).Returns(splitsStub); var splits = _splitService.List(1); Assert.NotEmpty(splits); }
public IEnumerable <SplitDto> List() { var userId = GetCurrentUserId(); return(_mapper.Map <IEnumerable <SplitDto> >(_splitService.List(userId))); }