public void ValidateSqlAdapter() { ExpressionConfigurations.SetSqlAdapter(new SqlServerAdapter()); Expression <Func <User, bool> > expression = u => u.Name == "Foo"; (string whereClause, Dictionary <string, object> parameters) = expression.ToWhereClause(); Dictionary <string, object> expectedParameters = new Dictionary <string, object>(); expectedParameters.Add("@Name", "Foo"); Assert.AreEqual("[Username] = @Name", whereClause); AssertParameters(expectedParameters, parameters); }
public void TestCleanup() { ExpressionConfigurations.SetSqlAdapter(new DefaultSqlAdapter()); }