public void CheckLogMark2Test() { var target = new LogParser(); var actual = target.CheckLogMark2(@" duration: 1747.419 ms statement: SELECT count(*) FROM pg_class"); Assert.AreEqual(true, actual.Success); Assert.AreEqual("1747.419", actual.Groups["duration_val"].ToString()); Assert.AreEqual("ms", actual.Groups["duration_suffix"].ToString()); Assert.AreEqual("SELECT count(*) FROM pg_class", actual.Groups["statement"].ToString()); }
public void CheckLogMark3Test() { var target = new LogParser(); var actual = target.CheckLogMark2(@"duration: 1605.489 ms statement: with periodu_datos as select "); Assert.AreEqual(true, actual.Success); Assert.AreEqual("1605.489", actual.Groups["duration_val"].ToString()); Assert.AreEqual("ms", actual.Groups["duration_suffix"].ToString()); var res = actual.Groups["statement"].ToString(); Assert.AreEqual("with periodu_datos as\r\n select\r\n", actual.Groups["statement"].ToString()); }