/// <summary> /// Updates the gamestrings of <paramref name="emoticonPack"/>. /// </summary> /// <param name="emoticonPack">The data who's gamestrings will be updated.</param> /// <param name="version">The version directory to load the gamestrings from.</param> /// <param name="localization">The <see cref="Localization"/> of the gamestrings.</param> /// <exception cref="ArgumentNullException"><paramref name="emoticonPack"/> is null.</exception> /// <exception cref="ArgumentNullException"><paramref name="version"/> is null.</exception> public void UpdateGameString(EmoticonPack emoticonPack, HeroesDataVersion version, Localization localization) { ArgumentNullException.ThrowIfNull(emoticonPack, nameof(emoticonPack)); ArgumentNullException.ThrowIfNull(version, nameof(version)); (_, string gameStringPath) = GetDataAndGameStringPaths(version, true, localization, _emoticonPackFileTemplateName, false, true); using GameStringDocument gameStringDocument = GameStringDocument.Parse(gameStringPath); emoticonPack.UpdateGameStrings(gameStringDocument); }
public void UpdateGameStringsTest() { using GameStringDocument gameStringDocument = GameStringDocument.Parse(LoadEnusLocalizedStringData()); EmoticonPack emoticonPack = new EmoticonPack { Id = "AbathurEmoticonPack2", }; emoticonPack.UpdateGameStrings(gameStringDocument); Assert.AreEqual("Abathur emojis that can be used to express emotions or ideas in chat. Hover over an emoji below to view its text command.", emoticonPack.Description !.RawDescription); }