public static void ShouldInsertAndUpdateVillages() { //Arrange IGameDataRepository _gameDataRepository = MockData.GetIGameDataRepository(); List <IVillage> villages = MockData.GetCharacterVillages(); //Act bool result1 = _gameDataRepository.UpdateVillages(villages); bool result2 = _gameDataRepository.UpdateVillages(villages); //Assert Assert.True(result1); Assert.True(result2); }
public void SetCharacterData(ICharacterData characterData) { if (characterData == null) { return; } CharacterData cData = _mapper.Map <CharacterData>(characterData); // Add the owning characterId of this village foreach (IVillage village in cData.Villages) { // village.WorldId = ActiveWorldId; // village.CharacterId = ActiveCharacterId; } _gameDataRepository.UpdateVillages(cData.Villages); }