示例#1
0
        public void InvalidHeaderFail()
        {
            const string Json = "{ \"timestamp\":\"2018-03-15T14:29:40Z\", \"event\":\"Music\", \"MusicTrack\":\"NoTrack\"  }";

            var fdEvent = FDEvent.Builder(Json) as FDEventCommander;

            Assert.IsNull(fdEvent);
        }
示例#2
0
        public void MusicTest()
        {
            const string Expected = "NoTrack";
            FDEventMusic fdEvent;

            fdEvent = FDEvent.Builder(JsonMusic) as FDEventMusic;

            Assert.AreEqual(Expected, fdEvent.MusicTrack);
        }
示例#3
0
        public void InvalidHeaderFail()
        {
            const string Json = "{ \"timestamp\":\"2018-03-15T14:30:31Z\", \"event\":\"Friends\", \"Status\":\"Online\", \"Name\":\"Falcon Darkstar\"  }";

            FDEventMusic fdEvent;

            fdEvent = FDEvent.Builder(Json) as FDEventMusic;
            Assert.IsNull(fdEvent);
        }
        public void GameVersionTest()
        {
            const String      Expected = "3.0.2.402 EDH";
            FDEventFileheader fdEvent;

            fdEvent = FDEvent.Builder(JsonFileHeader.Replace(@"\", @"\\")) as FDEventFileheader;

            Assert.AreEqual(Expected, fdEvent.GameVersion);
        }
        public void BuildTest()
        {
            const String      Expected = "r166781/r0 ";
            FDEventFileheader fdEvent;

            fdEvent = FDEvent.Builder(JsonFileHeader.Replace(@"\", @"\\")) as FDEventFileheader;

            Assert.AreEqual(Expected, fdEvent.Build);
        }
        public void LanguageTest()
        {
            const String      Expected = "English\\UK";
            FDEventFileheader fdEvent;

            fdEvent = FDEvent.Builder(JsonFileHeader.Replace(@"\", @"\\")) as FDEventFileheader;

            Assert.AreEqual(Expected, fdEvent.Language);
        }
        public void PartTest()
        {
            const int         Expected = 1;
            FDEventFileheader fdEvent;

            fdEvent = FDEvent.Builder(JsonFileHeader.Replace(@"\", @"\\")) as FDEventFileheader;

            Assert.AreEqual(Expected, fdEvent.Part);
        }
示例#8
0
        public void TimeStampTest()
        {
            DateTime Expected = new DateTime(2018, 3, 15, 14, 29, 40);
            FDEvent  fdEvent;

            fdEvent = FDEvent.Builder(JsonFileHeader.Replace(@"\", @"\\")) as FDEventFileheader;

            Assert.AreEqual(Expected, fdEvent.TimeStamp);
        }
示例#9
0
        public void NameTest()
        {
            const string     Json     = "{ \"timestamp\":\"2018-03-15T14:31:10Z\", \"event\":\"Commander\", \"Name\":\"La Mancha\" }";
            const string     Expected = "La Mancha";
            FDEventCommander fdEvent;

            fdEvent = FDEvent.Builder(Json) as FDEventCommander;

            Assert.AreEqual(Expected, fdEvent.Name);
        }
示例#10
0
        public void FileHeaderTest()
        {
            const string Expected = "Fileheader";
            FDEvent      fdEvent;

            fdEvent = FDEvent.Builder(JsonFileHeader.Replace(@"\", @"\\")) as FDEventFileheader;


            Assert.AreEqual(Expected, fdEvent.Event);
        }
示例#11
0
        public void NameTest()
        {
            const string JsonFriends = "{ \"timestamp\":\"2018-03-15T14:30:31Z\", \"event\":\"Friends\", \"Status\":\"Online\", \"Name\":\"Falcon Darkstar\"  }";
            const string Expected    = "Falcon Darkstar";

            FDEventFriends fdEvent;

            fdEvent = FDEvent.Builder(JsonFriends) as FDEventFriends;

            Assert.AreEqual(Expected, fdEvent.Name);
        }