コード例 #1
0
        public void DataDocumentROMLocaleTest()
        {
            using MountDataDocument document = MountDataDocument.Parse(GetBytesForROM("AlarakTaldarimMarch"), Localization.FRFR);

            Assert.AreEqual(Localization.FRFR, document.Localization);
            Assert.IsTrue(document.JsonDataDocument.RootElement.TryGetProperty("AlarakTaldarimMarch", out JsonElement _));
        }
コード例 #2
0
        public void DataDocumentFileTest()
        {
            using MountDataDocument document = MountDataDocument.Parse(_dataFile);

            Assert.AreEqual(Localization.KOKR, document.Localization);
            Assert.IsTrue(document.JsonDataDocument.RootElement.TryGetProperty("AlarakTaldarimMarch", out JsonElement _));
        }
コード例 #3
0
        public void DataDocumentStreamTest()
        {
            using FileStream stream          = new FileStream(_dataFile, FileMode.Open);
            using MountDataDocument document = MountDataDocument.Parse(stream, Localization.FRFR);

            Assert.AreEqual(Localization.FRFR, document.Localization);
            Assert.IsTrue(document.JsonDataDocument.RootElement.TryGetProperty("AlarakTaldarimMarch", out JsonElement _));
        }
コード例 #4
0
        public async Task DataDocumentStreamWithGameStringStreamAsyncTest()
        {
            using FileStream streamGameString = new FileStream(_jsonGameStringFileKOKR, FileMode.Open);
            using FileStream stream           = new FileStream(_dataFile, FileMode.Open);
            using MountDataDocument document  = await MountDataDocument.ParseAsync(stream, streamGameString);

            Assert.AreEqual(Localization.KOKR, document.Localization);
            Assert.IsTrue(document.JsonDataDocument.RootElement.TryGetProperty("AlarakTaldarimMarch", out JsonElement _));
        }
コード例 #5
0
    public void DataDocumentStreamWithGSDTest()
    {
        using GameStringDocument gameStringDocument = GameStringDocument.Parse(_jsonGameStringFileKOKR);
        using FileStream stream          = new(_dataFile, FileMode.Open);
        using MountDataDocument document = MountDataDocument.Parse(stream, gameStringDocument);

        Assert.AreEqual(Localization.KOKR, document.Localization);
        Assert.IsTrue(document.JsonDataDocument.RootElement.TryGetProperty("AlarakTaldarimMarch", out JsonElement _));
    }
コード例 #6
0
        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);
        }
コード例 #7
0
    public void UpdateGameStringMountTest()
    {
        using MountDataDocument dataDocument = _heroesDataDirectory.MountData(new HeroesDataVersion(2, 47, 3, 76124), true, Localization.KOKR);
        Mount data = dataDocument.GetMountById("AlarakTaldarimMarch");

        Assert.AreEqual("군주의 승천", data.Name);

        _heroesDataDirectory.UpdateGameString(data, new HeroesDataVersion(2, 48, 4, 77407), Localization.ENUS);
        Assert.AreEqual("mountName", data.Name);
    }
コード例 #8
0
    public void MountDataTest(int major, int minor, int revision, int build, bool isPtr, bool gamestrings, Localization localization)
    {
        MountDataDocument dataDocument = _heroesDataDirectory.MountData(new HeroesDataVersion(major, minor, revision, build, isPtr), gamestrings, localization);

        Assert.IsTrue(dataDocument.TryGetMountById("AlarakTaldarimMarch", out Mount? value));

        if (gamestrings)
        {
            Assert.IsTrue(!string.IsNullOrEmpty(value !.Name));
        }
        else
        {
            Assert.IsFalse(!string.IsNullOrEmpty(value !.Name));
        }
    }
コード例 #9
0
 public MountDataDocumentTests()
 {
     _mountDataDocument = MountDataDocument.Parse(LoadJsonTestData(), Localization.ENUS);
 }