public void ParseBatch_Statement_Word_Contains_GO() { IParser parser = new SqlDatabase(); string[] result = parser.ParseBatch(@"select * from table_go"); Assert.IsNotNull(result); Assert.AreEqual(1, result.Length); Assert.AreEqual("select * from table_go", result[0]); }
public void ParseBatch_Single_Statement() { IParser parser = new SqlDatabase(); string[] result = parser.ParseBatch("select * from table"); Assert.IsNotNull(result); Assert.AreEqual(1, result.Length); Assert.AreEqual("select * from table", result[0]); }
public void ParseBatch_Multiple_Statements() { IParser parser = new SqlDatabase(); string[] result = parser.ParseBatch(@"select * from table go select * from table2"); Assert.IsNotNull(result); Assert.AreEqual(2, result.Length); Assert.AreEqual("select * from table", result[0]); Assert.AreEqual("select * from table2", result[1]); }
public void ParseBatch_Empty() { IParser parser = new SqlDatabase(); string[] result = parser.ParseBatch(""); Assert.IsNotNull(result); Assert.IsEmpty(result); }