public void GetAllAsync_Should_Return_Characters_With_All_Friends_Included()
        {
            Character lukeFromDatabase = null;
            Character yodaFromDatabase = null;

            using (var context = DbContextHelper.GetInMemory())
            {
                context.Friendships.Add(new Friendship {
                    CharacterId = 1, FriendId = 2
                });
                context.SaveChanges();

                var characterRepository = new CharacterRepository(context);
                lukeFromDatabase = characterRepository.GetByIdAsync(1).Result;
                yodaFromDatabase = characterRepository.GetByIdAsync(2).Result;
            }

            Assert.Single(lukeFromDatabase.Friends);
            Assert.Single(yodaFromDatabase.Friends);
        }
        public void GetByIdAsync_Should_Return_Character_With_Given_Id(int id)
        {
            Character characterFromDatabase = null;

            using (var context = DbContextHelper.GetInMemory())
            {
                var characterRepository = new CharacterRepository(context);
                characterFromDatabase = characterRepository.GetByIdAsync(id).Result;
            }

            Assert.NotNull(characterFromDatabase);
            Assert.True(characterFromDatabase.Id == id);
        }