public void GetFavourite_MultipleElements_ReturnAllFavourites()
        {
            context.Database.EnsureDeleted();
            context.SaveChanges();
            FavouriteDevelopersController favDev = new FavouriteDevelopersController(context);
            var item = new GameDex_backend.Models.FavouriteDeveloper {
                FavId = 1, UserId = 1
            };
            var item2 = new GameDex_backend.Models.FavouriteDeveloper {
                FavId = 2, UserId = 1
            };

            context.Users.Add(new User {
                Id = 1, Username = "******"
            });
            context.SaveChanges();

            favDev.PostFavouriteDeveloper(item);
            favDev.PostFavouriteDeveloper(item2);

            Assert.AreEqual(new List <FavouriteDeveloper>()
            {
                item, item2
            }, favDev.GetFavouriteDeveloper().Result.Value.ToList());
        }
        public void GetFavourite_OneElement_ReturnAllFavourites()
        {
            context.Database.EnsureDeleted();
            context.SaveChanges();
            FavouriteDevelopersController favDev = new FavouriteDevelopersController(context);
            var item = new GameDex_backend.Models.FavouriteDeveloper {
                FavId = 1, UserId = 1
            };

            context.Users.Add(new User {
                Id = 1, Username = "******"
            });
            context.SaveChanges();

            favDev.PostFavouriteDeveloper(item);
            var result = favDev.GetFavouriteDeveloper();

            Assert.AreEqual(item, result.Result.Value.First());
        }
        public void GetFavouriteById_ValidId_ReturnFavourite()
        {
            context.Database.EnsureDeleted();
            context.SaveChanges();
            FavouriteDevelopersController favDev = new FavouriteDevelopersController(context);
            var item = new GameDex_backend.Models.FavouriteDeveloper {
                FavId = 1, UserId = 1
            };
            var item2 = new GameDex_backend.Models.FavouriteDeveloper {
                FavId = 2, UserId = 1
            };

            context.Users.Add(new User {
                Id = 1, Username = "******"
            });
            context.SaveChanges();

            favDev.PostFavouriteDeveloper(item);
            favDev.PostFavouriteDeveloper(item2);

            Assert.AreEqual(item, favDev.GetFavouriteDeveloper(1));
        }