Пример #1
0
        public async Task RemoveFavorites()
        {
            var user     = fillTestDbHelper.Users.LastOrDefault(opt => !opt.Favorites.IsNullOrEmpty());
            var favorite = user.Favorites.FirstOrDefault();
            await favoritesService.RemoveUserFavoritesAsync(favorite.ChannelId, favorite.ChatId, favorite.ContactId, user.Id);

            var actualFavorites = fillTestDbHelper.Users.FirstOrDefault(opt => opt.Id == user.Id).Favorites;

            Assert.True(user.Favorites.Count - 1 == actualFavorites.Count);
        }