public void TestSqlBodyRule_EmptyLine() { string test = " \t \t "; var rule = new SqlBodyRule(); var res = rule.Apply(test); Assert.IsNotNull(res); Assert.AreEqual(EventType.Unknown, res.EventType); Assert.AreEqual(LineType.Empty, res.LineType); }
public void TestSqlBodyRule() { string test = "********** 09:33:17.533 [13C595F0] DOCSSQL: EXECute SQL Statement on Library:MYLIB - MYDB (Oracle7) **********"; var rule = new SqlBodyRule(); var res = rule.Apply(test); Assert.IsNotNull(res); Assert.AreEqual("13C595F0", res.Key); Assert.AreEqual("09:33:17.533", res.Values[ValueKeys.Time]); Assert.AreEqual(LineType.Body, res.LineType); Assert.AreEqual(EventType.Sql, res.EventType); Assert.IsNotNull(res.RequiredBlockRule); }