Exemple #1
0
        public async Task DataDocumentStreamWithGameStringDocumentAsyncTest()
        {
            using GameStringDocument gameStringDocument = GameStringDocument.Parse(_jsonGameStringFileKOKR);
            using FileStream stream          = new FileStream(_dataFile, FileMode.Open);
            using SprayDataDocument document = await SprayDataDocument.ParseAsync(stream, gameStringDocument);

            Assert.AreEqual(Localization.KOKR, document.Localization);
            Assert.IsTrue(document.JsonDataDocument.RootElement.TryGetProperty("SprayAnimatedCookieAbathur", out JsonElement _));
        }
        public void DataDocumentStreamWithGSDTest()
        {
            using GameStringDocument gameStringDocument = GameStringDocument.Parse(_jsonGameStringFileKOKR);
            using FileStream stream = new FileStream(_dataFile, FileMode.Open);
            using TypeDescriptionDataDocument document = TypeDescriptionDataDocument.Parse(stream, gameStringDocument);

            Assert.AreEqual(Localization.KOKR, document.Localization);
            Assert.IsTrue(document.JsonDataDocument.RootElement.TryGetProperty("BasicPortrait", out JsonElement _));
        }
        public void DataDocumentROMGSDTest()
        {
            using GameStringDocument gameStringDocument = GameStringDocument.Parse(_jsonGameStringFileKOKR);
            using TypeDescriptionDataDocument document  = TypeDescriptionDataDocument.Parse(GetBytesForROM("BasicPortrait"), gameStringDocument);

            Assert.AreEqual(Localization.KOKR, document.Localization);
            Assert.IsTrue(document.TryGetTypeDescriptionById("BasicPortrait", out TypeDescription? typeDescription));
            Assert.AreEqual("some basic portrait", typeDescription !.Name);
        }
        public void DataDocumentStreamWithGSDTest()
        {
            using GameStringDocument gameStringDocument = GameStringDocument.Parse(_jsonGameStringFileKOKR);
            using FileStream stream = new FileStream(_dataFile, FileMode.Open);
            using EmoticonPackDataDocument document = EmoticonPackDataDocument.Parse(stream, gameStringDocument);

            Assert.AreEqual(Localization.KOKR, document.Localization);
            Assert.IsTrue(document.JsonDataDocument.RootElement.TryGetProperty("CatSpooky18Pack", out JsonElement _));
        }
        public void DataDocumentROMGSDTest()
        {
            using GameStringDocument gameStringDocument = GameStringDocument.Parse(_jsonGameStringFileKOKR);
            using MountDataDocument document            = MountDataDocument.Parse(GetBytesForROM("AlarakTaldarimMarch"), gameStringDocument);

            Assert.AreEqual(Localization.KOKR, document.Localization);
            Assert.IsTrue(document.TryGetMountById("AlarakTaldarimMarch", out Mount? mount));
            Assert.AreEqual("군주의 승천", mount !.Name);
            Assert.AreEqual("그가 공중에 살짝만 떠올라도 당신은 군주를 따라잡을 수 없습니다.", mount !.InfoText?.RawDescription);
        }
        public void DataDocumentROMGSDTest()
        {
            using GameStringDocument gameStringDocument = GameStringDocument.Parse(_jsonGameStringFileKOKR);
            using HeroSkinDataDocument document         = HeroSkinDataDocument.Parse(GetBytesForROM("AbathurBaseVar3"), gameStringDocument);

            Assert.AreEqual(Localization.KOKR, document.Localization);
            Assert.IsTrue(document.TryGetHeroSkinById("AbathurBaseVar3", out HeroSkin? heroSkin));
            Assert.AreEqual("칼디르 아바투르", heroSkin !.Name);
            Assert.AreEqual("케리건이 지배하는 저그 군단의 진화 군주인 아바투르는, 저그를 유전자 단계에서부터 발전시키기 위해 끊임없이 노력합니다. 불완전과 혼돈에 대한 그의 증오는 대명사와 어미에 대한 그의 증오에 거의 맞먹습니다.", heroSkin !.InfoText?.RawDescription);
        }
    public void DataDocumentROMGSDTest()
    {
        using GameStringDocument gameStringDocument = GameStringDocument.Parse(_jsonGameStringFileKOKR);
        using EmoticonPackDataDocument document     = EmoticonPackDataDocument.Parse(GetBytesForROM("CatSpooky18Pack"), gameStringDocument);

        Assert.AreEqual(Localization.KOKR, document.Localization);
        Assert.IsTrue(document.TryGetEmoticonPackById("CatSpooky18Pack", out EmoticonPack? emoticonPack));
        Assert.AreEqual("저주받은 고양이 이모티콘 팩", emoticonPack !.Name);
        Assert.IsNull(emoticonPack !.Description?.RawDescription);
    }
    public void DataDocumentFileGSDTest()
    {
        using GameStringDocument gameStringDocument = GameStringDocument.Parse(_jsonGameStringFileFRFR);
        using EmoticonPackDataDocument document     = EmoticonPackDataDocument.Parse(_dataFile, gameStringDocument);

        Assert.AreEqual(Localization.FRFR, document.Localization);
        Assert.IsTrue(document.TryGetEmoticonPackById("CassiaEmoticonPack2", out EmoticonPack? emoticonPack));
        Assert.AreEqual("카시아 팩 2", emoticonPack !.Name);
        Assert.AreEqual("대화에서 실감나는 감정 표현을 할 수 있는 카시아 이모티콘입니다. 아래의 이모티콘에 마우스 커서를 올려 놓으면 명령어를 확인할 수 있습니다.", emoticonPack !.Description?.RawDescription);
    }
        public void DataDocumentROMGSDTest()
        {
            using GameStringDocument gameStringDocument = GameStringDocument.Parse(_jsonGameStringFileKOKR);
            using EmoticonDataDocument document         = EmoticonDataDocument.Parse(GetBytesForROM("cat_blink_anim"), gameStringDocument);

            Assert.AreEqual(Localization.KOKR, document.Localization);
            Assert.IsTrue(document.TryGetEmoticonById("cat_blink_anim", out Emoticon? emoticon));
            Assert.AreEqual("Unknown", emoticon !.Name);
            Assert.AreEqual("저주받은 고양이 점멸 :고양점멸:", emoticon !.Description?.RawDescription);
        }
        public void DataDocumentFileGSDTest()
        {
            using GameStringDocument gameStringDocument = GameStringDocument.Parse(_jsonGameStringFileFRFR);
            using EmoticonDataDocument document         = EmoticonDataDocument.Parse(_dataFile, gameStringDocument);

            Assert.AreEqual(Localization.FRFR, document.Localization);
            Assert.IsTrue(document.TryGetEmoticonById("abathur_mecha_angry", out Emoticon? emoticon));
            Assert.AreEqual("Angry", emoticon !.Name);
            Assert.AreEqual("제노공학 아바투르 화남 :제노아바 화:", emoticon !.Description?.RawDescription);
        }
    /// <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);
    }
    /// <summary>
    /// Updates the gamestrings of <paramref name="hero"/>.
    /// </summary>
    /// <param name="hero">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="hero"/> is null.</exception>
    /// <exception cref="ArgumentNullException"><paramref name="version"/> is null.</exception>
    public void UpdateGameString(Hero hero, HeroesDataVersion version, Localization localization)
    {
        ArgumentNullException.ThrowIfNull(hero, nameof(hero));
        ArgumentNullException.ThrowIfNull(version, nameof(version));

        (_, string gameStringPath) = GetDataAndGameStringPaths(version, true, localization, _heroFileTemplateName, false, true);

        using GameStringDocument gameStringDocument = GameStringDocument.Parse(gameStringPath);

        hero.UpdateGameStrings(gameStringDocument);
    }
    /// <summary>
    /// Updates the gamestrings of <paramref name="matchAward"/>.
    /// </summary>
    /// <param name="matchAward">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="matchAward"/> is null.</exception>
    /// <exception cref="ArgumentNullException"><paramref name="version"/> is null.</exception>
    public void UpdateGameString(MatchAward matchAward, HeroesDataVersion version, Localization localization)
    {
        ArgumentNullException.ThrowIfNull(matchAward, nameof(matchAward));
        ArgumentNullException.ThrowIfNull(version, nameof(version));

        (_, string gameStringPath) = GetDataAndGameStringPaths(version, true, localization, _matchAwardFileTemplateName, false, true);

        using GameStringDocument gameStringDocument = GameStringDocument.Parse(gameStringPath);

        matchAward.UpdateGameStrings(gameStringDocument);
    }
    /// <summary>
    /// Updates the gamestrings of <paramref name="rewardPortrait"/>.
    /// </summary>
    /// <param name="rewardPortrait">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="rewardPortrait"/> is null.</exception>
    /// <exception cref="ArgumentNullException"><paramref name="version"/> is null.</exception>
    public void UpdateGameString(RewardPortrait rewardPortrait, HeroesDataVersion version, Localization localization)
    {
        ArgumentNullException.ThrowIfNull(rewardPortrait, nameof(rewardPortrait));
        ArgumentNullException.ThrowIfNull(version, nameof(version));

        (_, string gameStringPath) = GetDataAndGameStringPaths(version, true, localization, _rewardPortraitFileTemplateName, false, true);

        using GameStringDocument gameStringDocument = GameStringDocument.Parse(gameStringPath);

        rewardPortrait.UpdateGameStrings(gameStringDocument);
    }
    /// <summary>
    /// Updates the gamestrings of <paramref name="announcer"/>.
    /// </summary>
    /// <param name="announcer">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="announcer"/> is null.</exception>
    /// <exception cref="ArgumentNullException"><paramref name="version"/> is null.</exception>
    public void UpdateGameString(Announcer announcer, HeroesDataVersion version, Localization localization)
    {
        ArgumentNullException.ThrowIfNull(announcer, nameof(announcer));
        ArgumentNullException.ThrowIfNull(version, nameof(version));

        (_, string gameStringPath) = GetDataAndGameStringPaths(version, true, localization, _announcerFileTemplateName, false, true);

        using GameStringDocument gameStringDocument = GameStringDocument.Parse(gameStringPath);

        announcer.UpdateGameStrings(gameStringDocument);
    }
Exemple #16
0
    public void UpdateGameStringsTest()
    {
        using GameStringDocument gameStringDocument = GameStringDocument.Parse(LoadEnusLocalizedStringData());

        RewardPortrait rewardPortrait = new()
        {
            Id = "1YearAnniversaryPortrait",
        };

        rewardPortrait.UpdateGameStrings(gameStringDocument);

        Assert.AreEqual("1 Year Anniversary Portrait", rewardPortrait.Name);
    }
    public void UpdateGameStringsTest()
    {
        using GameStringDocument gameStringDocument = GameStringDocument.Parse(LoadEnusLocalizedStringData());

        EmoticonPack emoticonPack = new()
        {
            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);
    }
Exemple #18
0
    public void UpdateGameStringsTest()
    {
        using GameStringDocument gameStringDocument = GameStringDocument.Parse(LoadEnusLocalizedStringData());

        Spray spray = new()
        {
            Id = "SprayAnimatedCarbotsAlarakDark",
        };

        spray.UpdateGameStrings(gameStringDocument);

        Assert.AreEqual(string.Empty, spray.Description !.RawDescription);
    }
Exemple #19
0
    public void UpdateGameStringsTest()
    {
        using GameStringDocument gameStringDocument = GameStringDocument.Parse(LoadEnusLocalizedStringData());

        MatchAward matchAward = new()
        {
            Id = "ClutchHealer",
        };

        matchAward.UpdateGameStrings(gameStringDocument);

        Assert.AreEqual("Many Heals That Saved a Dying Ally", matchAward.Description !.RawDescription);
    }
Exemple #20
0
        public void UpdateGameStringsTest()
        {
            using GameStringDocument gameStringDocument = GameStringDocument.Parse(LoadEnusLocalizedStringData());

            Mount mount = new Mount
            {
                Id = "AlarakTaldarimMarch",
            };

            mount.UpdateGameStrings(gameStringDocument);

            Assert.AreEqual("Should he choose to float only an inch off the ground, you would still be beneath the Highlord.", mount.InfoText !.RawDescription);
        }
Exemple #21
0
        public void UpdateGameStringsTest()
        {
            using GameStringDocument gameStringDocument = GameStringDocument.Parse(LoadEnusLocalizedStringData());

            Banner banner = new Banner
            {
                Id = "BannerD3DemonHunterRare",
            };

            banner.UpdateGameStrings(gameStringDocument);

            Assert.AreEqual("Only a hunter whose hatred is fully tempered by discipline will ever bear the sigil of the Order-masters.", banner.Description !.RawDescription);
        }
    public void UpdateGameStringsTest()
    {
        using GameStringDocument gameStringDocument = GameStringDocument.Parse(LoadEnusLocalizedStringData());

        PortraitPack portraitPack = new()
        {
            Id = "AbathurToys18Portrait",
        };

        portraitPack.UpdateGameStrings(gameStringDocument);

        Assert.AreEqual("Caterpillathur Portrait", portraitPack.Name);
    }
Exemple #23
0
        public void UpdateGameStringsTest()
        {
            using GameStringDocument gameStringDocument = GameStringDocument.Parse(LoadEnusLocalizedStringData());

            LootChest lootChest = new LootChest
            {
                Id = "BasicPortrait",
            };

            lootChest.UpdateGameStrings(gameStringDocument);

            Assert.AreEqual("some name", lootChest.Name);
        }
Exemple #24
0
        public void UpdateGameStringsTest()
        {
            using GameStringDocument gameStringDocument = GameStringDocument.Parse(LoadEnusLocalizedStringData());

            Announcer announcer = new Announcer
            {
                Id = "AbathurA",
            };

            announcer.UpdateGameStrings(gameStringDocument);

            Assert.AreEqual("asdf", announcer.Description !.RawDescription);
        }
Exemple #25
0
        public void UpdateGameStringsTest()
        {
            using GameStringDocument gameStringDocument = GameStringDocument.Parse(LoadEnusLocalizedStringData());

            HeroSkin heroSkin = new HeroSkin
            {
                Id = "AbathurBaseVar3",
            };

            heroSkin.UpdateGameStrings(gameStringDocument);

            Assert.AreEqual("Abathur, the Evolution Master of Kerrigan's Swarm, works ceaselessly to improve the zerg from the genetic level up. His hate for chaos and imperfection almost rivals his hatred of pronouns.", heroSkin.InfoText !.RawDescription);
        }
        public void UpdateGameStringsTest()
        {
            using GameStringDocument gameStringDocument = GameStringDocument.Parse(LoadEnusLocalizedStringData());

            Boost boost = new Boost
            {
                Id = "30DayPromo",
            };

            boost.UpdateGameStrings(gameStringDocument);

            Assert.AreEqual("30 Day Boost", boost.Name);
            Assert.AreEqual("xyz30DayBoost", boost.SortName);
        }
    public void UpdateGameStringsTest()
    {
        using GameStringDocument gameStringDocument = GameStringDocument.Parse(LoadEnusLocalizedStringData());

        VoiceLine voiceLine = new()
        {
            Id = "AbathurBase_VoiceLine01",
        };

        voiceLine.UpdateGameStrings(gameStringDocument);

        Assert.IsNull(voiceLine.Description?.RawDescription);
        Assert.AreEqual("For the Swarm", voiceLine.Name);
    }
Exemple #28
0
    public void UpdateGameStringsTest()
    {
        using GameStringDocument gameStringDocument = GameStringDocument.Parse(LoadEnusLocalizedStringData());

        Bundle bundle = new()
        {
            Id = "RaiderRexxarBundle",
        };

        bundle.UpdateGameStrings(gameStringDocument);

        Assert.AreEqual("특공대원 렉사르 묶음 상품", bundle.Name);
        Assert.AreEqual("xyzRaiderRexxarBundle", bundle.SortName);
    }
        public void UpdateGameStringsTest()
        {
            using GameStringDocument gameStringDocument = GameStringDocument.Parse(LoadEnusLocalizedStringData());

            Unit unit = new Unit
            {
                CUnitId = "AbathurEvolvedMonstrosity",
                Id      = "AbathurEvolvedMonstrosity",
            };

            unit.UpdateGameStrings(gameStringDocument);

            Assert.AreEqual("A long description", unit.Description !.RawDescription);
        }
        public void UpdateGameStringsTest()
        {
            using GameStringDocument gameStringDocument = GameStringDocument.Parse(LoadEnusLocalizedStringData());

            LootChest lootChest = new LootChest
            {
                Id = "EpicProgChest",
            };

            lootChest.UpdateGameStrings(gameStringDocument);

            Assert.AreEqual("Epic Chest", lootChest.Name);
            Assert.AreEqual("A Loot Chest that guarantees at least one Epic or better item.", lootChest.Description !.RawDescription);
        }