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); }
public void MusicTest() { const string Expected = "NoTrack"; FDEventMusic fdEvent; fdEvent = FDEvent.Builder(JsonMusic) as FDEventMusic; Assert.AreEqual(Expected, fdEvent.MusicTrack); }
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); }
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); }
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); }
public void FileHeaderTest() { const string Expected = "Fileheader"; FDEvent fdEvent; fdEvent = FDEvent.Builder(JsonFileHeader.Replace(@"\", @"\\")) as FDEventFileheader; Assert.AreEqual(Expected, fdEvent.Event); }
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); }