public void TryGetVoiceLineByIdTest(string?id)
        {
            if (id is null || id == "asdf")
            {
                Assert.IsFalse(_voiceLineDataDocument.TryGetVoiceLineById(id, out _));

                return;
            }

            Assert.IsTrue(_voiceLineDataDocument.TryGetVoiceLineById(id, out VoiceLine? _));
            if (_voiceLineDataDocument.TryGetVoiceLineById(id, out VoiceLine? voiceLine))
            {
                BasicMephistoBase_VoiceLine02Asserts(voiceLine);
            }
        }
        public void DataDocumentROMGSDTest()
        {
            using GameStringDocument gameStringDocument = GameStringDocument.Parse(_jsonGameStringFileKOKR);
            using VoiceLineDataDocument document        = VoiceLineDataDocument.Parse(GetBytesForROM("AbathurBase_VoiceLine01"), gameStringDocument);

            Assert.AreEqual(Localization.KOKR, document.Localization);
            Assert.IsTrue(document.TryGetVoiceLineById("AbathurBase_VoiceLine01", out VoiceLine? voiceLine));
            Assert.AreEqual("군단을 위하여", voiceLine !.Name);
        }
        public void DataDocumentFileGSDTest()
        {
            using GameStringDocument gameStringDocument = GameStringDocument.Parse(_jsonGameStringFileFRFR);
            using VoiceLineDataDocument document        = VoiceLineDataDocument.Parse(_dataFile, gameStringDocument);

            Assert.AreEqual(Localization.FRFR, document.Localization);
            Assert.IsTrue(document.TryGetVoiceLineById("AbathurBase_VoiceLine01", out VoiceLine? voiceLine));
            Assert.AreEqual("군단을 위하여", voiceLine !.Name);
        }
Exemplo n.º 4
0
    public void VoiceLineDataTest(int major, int minor, int revision, int build, bool isPtr, bool gamestrings, Localization localization)
    {
        VoiceLineDataDocument dataDocument = _heroesDataDirectory.VoiceLineData(new HeroesDataVersion(major, minor, revision, build, isPtr), gamestrings, localization);

        Assert.IsTrue(dataDocument.TryGetVoiceLineById("AbathurBase_VoiceLine01", out VoiceLine? value));

        if (gamestrings)
        {
            Assert.IsTrue(!string.IsNullOrEmpty(value !.Name));
        }
        else
        {
            Assert.IsFalse(!string.IsNullOrEmpty(value !.Name));
        }
    }