Example #1
0
        public async Task GetUserFavorites()
        {
            var user      = fillTestDbHelper.Users.FirstOrDefault();
            var favorites = await favoritesService.GetUserFavoritesAsync(user.Id);

            Assert.True(user.Favorites.Count == favorites.Count);
        }
        public async Task <Response> CreateResponseAsync()
        {
            List <UserFavoritesDto> usersFavorites = await favoritesService.GetUserFavoritesAsync(clientConnection.UserId.GetValueOrDefault()).ConfigureAwait(false);

            return(new FavoritesResponse(request.RequestId, UserFavoritesConverter.GetUserFavoritesVms(usersFavorites, clientConnection.UserId.GetValueOrDefault())));
        }