Beispiel #1
0
        public static void ShouldUpdateLoginDataToDbCorrectly()
        {
            //Arrange
            IGameDataRepository _gameDataRepository = MockData.GetIGameDataRepository(true);

            ILoginData loginData = MockData.GetILoginData();

            // Act
            _gameDataRepository.UpdateLoginData(loginData);


            using (var db = MockData.GetDbContext())
            {
                var characterList = db.Characters.ToList();

                Assert.NotNull(characterList.FirstOrDefault(
                                   x => x.CharacterId == 999888 &&
                                   x.CharacterName == "FAKENAME" &&
                                   x.WorldId == "nl33"));

                Assert.NotNull(characterList.FirstOrDefault(
                                   x => x.CharacterId == 999888 &&
                                   x.CharacterName == "FAKENAME" &&
                                   x.WorldId == "nl35"));

                Assert.NotNull(characterList.FirstOrDefault(
                                   x => x.CharacterId == 999888 &&
                                   x.CharacterName == "FAKENAME" &&
                                   x.WorldId == "nl37"));
            }
        }