Inheritance: Remotion.Linq.SqlBackend.SqlGeneration.SqlCustomTextGeneratorExpressionBase
Beispiel #1
0
        public void VisitSqlCustomTextGeneratorExpression()
        {
            var expression = new TestableSqlCustomTextGeneratorExpression(typeof(string));

            SqlGeneratingExpressionVisitor.GenerateSql(expression, _commandBuilder, _stageMock);

            Assert.That(_commandBuilder.GetCommandText(), Is.EqualTo("TestableSqlCustomTextGeneratorExpression"));
        }
        public void Accept()
        {
            var mockRepository = new MockRepository();
            var visitorMock    = mockRepository.StrictMultiMock <ExpressionTreeVisitor> (typeof(ISqlCustomTextGeneratorExpressionVisitor));

            var customTextGeneratorExpression = new TestableSqlCustomTextGeneratorExpression(typeof(Cook));

            visitorMock
            .Expect(mock => ((ISqlCustomTextGeneratorExpressionVisitor)mock).VisitSqlCustomTextGeneratorExpression(customTextGeneratorExpression))
            .Return(customTextGeneratorExpression);
            visitorMock.Replay();

            customTextGeneratorExpression.Accept(visitorMock);

            visitorMock.VerifyAllExpectations();
        }
    public void Accept ()
    {
      var mockRepository = new MockRepository ();
      var visitorMock = mockRepository.StrictMultiMock<ExpressionTreeVisitor> (typeof (ISqlCustomTextGeneratorExpressionVisitor));

      var customTextGeneratorExpression = new TestableSqlCustomTextGeneratorExpression (typeof (Cook));

      visitorMock
          .Expect (mock => ((ISqlCustomTextGeneratorExpressionVisitor)mock).VisitSqlCustomTextGeneratorExpression (customTextGeneratorExpression))
          .Return (customTextGeneratorExpression);
      visitorMock.Replay();

      customTextGeneratorExpression.Accept (visitorMock);

      visitorMock.VerifyAllExpectations();
    }
    public void VisitSqlCustomTextGeneratorExpression ()
    {
      var expression = new TestableSqlCustomTextGeneratorExpression (typeof (string));

      SqlGeneratingExpressionVisitor.GenerateSql (expression, _commandBuilder, _stageMock);

      Assert.That (_commandBuilder.GetCommandText(), Is.EqualTo ("TestableSqlCustomTextGeneratorExpression"));
    }