public void ParseMiddle() { var msg = MessageParser.ExtractMessages("../../../cincron/sample-messages", 363143, "Jan 25 01:13:12 ABCDEF CINCRON[5889]: stn002--I10402:Control Data for Work Unit 22 Updated [STEP_NO = 2]", centralZone); var expected = Newtonsoft.Json.JsonConvert.DeserializeObject <List <CincronMessage> >(System.IO.File.ReadAllText("../../../cincron/sample-messages.json"), jsonSettings); msg.Should().BeEquivalentTo(expected.GetRange(2533, 2233)); }
public void ParseAllMessages() { var msg = MessageParser.ExtractMessages("../../../cincron/sample-messages", 0, "", centralZone); var expected = Newtonsoft.Json.JsonConvert.DeserializeObject <List <CincronMessage> >(System.IO.File.ReadAllText("../../../cincron/sample-messages.json"), jsonSettings); msg.Should().BeEquivalentTo(expected); }
public void ParseMiddle() { var msg = MessageParser.ExtractMessages("../../../cincron/sample-messages", 363143, "Jan 25 01:13:12 ABCDEF CINCRON[5889]: stn002--I10402:Control Data for Work Unit 22 Updated [STEP_NO = 2]", centralZone); var expected = LoadExpected(); msg.Should().BeEquivalentTo(expected.GetRange(2533, 2233)); }
public void Rollover() { var msg = MessageParser.ExtractMessages("../../../cincron/sample-messages", 363143, "bad match", centralZone); var expected = Newtonsoft.Json.JsonConvert.DeserializeObject <List <CincronMessage> >(System.IO.File.ReadAllText("../../../cincron/sample-messages.json"), jsonSettings); // since offset doesn't match, should load everything from beginning msg.Should().BeEquivalentTo(expected); }
public void Rollover() { var msg = MessageParser.ExtractMessages("../../../cincron/sample-messages", 363143, "bad match", centralZone); var expected = LoadExpected(); // since offset doesn't match, should load everything from beginning msg.Should().BeEquivalentTo(expected); }
public void ParseAllMessages() { var msg = MessageParser.ExtractMessages("../../../cincron/sample-messages", 0, "", centralZone); msg.Should().BeEquivalentTo(LoadExpected()); }