コード例 #1
0
        public void TryGetEmoticonByIdTest(string?id)
        {
            if (id is null || id == "asdf")
            {
                Assert.IsFalse(_emoticonDataDocument.TryGetEmoticonById(id, out _));

                return;
            }

            Assert.IsTrue(_emoticonDataDocument.TryGetEmoticonById(id, out Emoticon? _));
            if (_emoticonDataDocument.TryGetEmoticonById(id, out Emoticon? emoticon))
            {
                Basicabathur_mecha_angryAsserts(emoticon);
            }
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        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);
        }
コード例 #4
0
    public void EmoticonDataTest(int major, int minor, int revision, int build, bool isPtr, bool gamestrings, Localization localization)
    {
        EmoticonDataDocument dataDocument = _heroesDataDirectory.EmoticonData(new HeroesDataVersion(major, minor, revision, build, isPtr), gamestrings, localization);

        Assert.IsTrue(dataDocument.TryGetEmoticonById("cat_blink_anim", out Emoticon? value));

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