public async Task GetAllSolverLogsWhenListIsEmpty() { _logRepoMock.GetAllAnagramSolveLogs().Returns(new List <UserLogEntity>()); var result = await _logService.GetAllSolverLogs(); await _logRepoMock.Received().GetAllAnagramSolveLogs(); Assert.AreEqual(0, result.Count); }
public async Task <List <UserLog> > GetAllSolverLogs() { var logsEntities = await _userLogRepository.GetAllAnagramSolveLogs(); if (logsEntities == null || logsEntities.Count < 1) { return(new List <UserLog>()); } var logs = _mapper.Map <List <UserLog> >(logsEntities); return(logs); }