Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        public IEnumerable <SplitDto> List()
        {
            var userId = GetCurrentUserId();

            return(_mapper.Map <IEnumerable <SplitDto> >(_splitService.List(userId)));
        }