public void GetCommandParameters ()
    {
      _sqlCommandBuilder.CreateParameter ("value");

      var expectedCommandParameter = new CommandParameter ("@1", "value");
      Assert.That (_sqlCommandBuilder.GetCommandParameters (), Is.EqualTo (new[] { expectedCommandParameter }));
    }
    public void GetCommand ()
    {
      _sqlCommandBuilder.Append ("Test");
      _sqlCommandBuilder.CreateParameter ("value");

      var body = Expression.Constant (0);
      _sqlCommandBuilder.SetInMemoryProjectionBody (body);

      var data = _sqlCommandBuilder.GetCommand();

      Assert.That (data.CommandText, Is.EqualTo ("Test"));

      var expectedCommandParameter = new CommandParameter ("@1", "value");
      Assert.That (_sqlCommandBuilder.GetCommandParameters (), Is.EqualTo (new[] { expectedCommandParameter }));

      var expectedInMemoryProjection = Expression.Lambda<Func<IDatabaseResultRow, int>> (body, _sqlCommandBuilder.InMemoryProjectionRowParameter);
      SqlExpressionTreeComparer.CheckAreEqualTrees (expectedInMemoryProjection, data.GetInMemoryProjection<int> ());
    }