public void supports_traditional_all_caps_formatting() { var session = new LinqQueryRewritingSession(); Assume.That(() => session.UseTraditionalFormatting == false); session.UseTraditionalFormatting = true; session.Nolock = true; session.AddHint(QueryHint.Recompile); Check.That(() => session.Rewrite("SELECT *\r\nFROM [Foo] AS [t0]") == "SELECT *\r\nFROM [Foo] AS [t0] WITH(NOLOCK)\r\nOPTION(RECOMPILE)"); }
public void supports_recompile_query_hint() { var session = new LinqQueryRewritingSession(); session.AddHint(QueryHint.Recompile); Check.That(() => session.Rewrite("SELECT *\r\nFROM [Foo] AS [t0]") == "SELECT *\r\nFROM [Foo] AS [t0]\r\noption(recompile)"); }