public void Throw_WhenBeersDrankBeerIdIsInvalid()
        {
            var options = Utils.GetOptions(nameof(Throw_WhenBeersDrankBeerIdIsInvalid));
            var user    = TestsModelsSeeder.SeedUser();
            var beer    = TestsModelsSeeder.SeedBeer();

            using (var arrangeContext = new BeerOverflowContext(options))
            {
                arrangeContext.Users.Add(user);
                arrangeContext.Beers.Add(beer);
                arrangeContext.SaveChanges();
            }
            using (var assertContext = new BeerOverflowContext(options))
            {
                var sut = new UserServices(assertContext);
                Assert.ThrowsException <ArgumentNullException>(() => sut.AddToWishlist(1, 2));
            }
        }
        public void ReturnTrue_WhenBeerAddedCorrectlyToBeersDrank()
        {
            var options = Utils.GetOptions(nameof(ReturnTrue_WhenBeerAddedCorrectlyToBeersDrank));
            var user    = TestsModelsSeeder.SeedUser();
            var beer    = TestsModelsSeeder.SeedBeer();

            using (var arrangeContext = new BeerOverflowContext(options))
            {
                arrangeContext.Users.Add(user);
                arrangeContext.Beers.Add(beer);
                arrangeContext.SaveChanges();
            }

            using (var assertContext = new BeerOverflowContext(options))
            {
                var sut    = new UserServices(assertContext);
                var result = sut.AddToWishlist(1, 1);
                Assert.IsTrue(result);
            }
        }
        public void AddCorrectly_WhenParamsAreValid()
        {
            var options = Utils.GetOptions(nameof(AddCorrectly_WhenParamsAreValid));
            var user    = TestsModelsSeeder.SeedUser();
            var beer    = TestsModelsSeeder.SeedBeer();

            using (var arrangeContext = new BeerOverflowContext(options))
            {
                arrangeContext.Users.Add(user);
                arrangeContext.Beers.Add(beer);
                arrangeContext.SaveChanges();
            }

            using (var assertContext = new BeerOverflowContext(options))
            {
                var sut    = new UserServices(assertContext);
                var act    = sut.AddToWishlist(1, 1);
                var result = assertContext.Users.FirstOrDefault(u => u.UserName == user.UserName).Wishlist.ToList();
                Assert.AreEqual(1, result.Count);
                Assert.AreEqual(beer.Id, result[0].BeerId);
            }
        }