Example #1
0
    public void UpdateGameStringHeroTest()
    {
        using HeroDataDocument dataDocument = _heroesDataDirectory.HeroData(new HeroesDataVersion(2, 47, 3, 76124), true, Localization.KOKR);
        Hero data = dataDocument.GetHeroById("Abathur", false, false, false, false);

        Assert.AreEqual("전장 어디에서나 전투에 영향을 줄 수 있는 독특한 영웅입니다.", data.Description?.RawDescription);

        _heroesDataDirectory.UpdateGameString(data, new HeroesDataVersion(2, 48, 4, 77407), Localization.ENUS);
        Assert.AreEqual("heroDescription", data.Description?.RawDescription);
    }
Example #2
0
    public void HeroDataLoadDuplicateDataTest(int major, int minor, int revision, int build, bool isPtr, bool gamestrings, Localization localization)
    {
        HeroDataDocument heroDataDocument = _heroesDataDirectory.HeroData(new HeroesDataVersion(major, minor, revision, build, isPtr), gamestrings, localization);

        Assert.IsTrue(heroDataDocument.TryGetHeroById("Abathur", out Hero? hero, false, false, false, false));

        if (gamestrings)
        {
            Assert.IsTrue(!string.IsNullOrEmpty("this is some text."));
        }
        else
        {
            Assert.IsFalse(!string.IsNullOrEmpty(hero !.Description?.RawDescription));
        }
    }