public void VisitExpression_ExtensionExpression() { var expectedResult = Expression.Constant(0); var visitor = new TestableExpressionTreeVisitor(); var extensionExpressionMock = MockRepository.StrictMock <ExtensionExpression> (typeof(int)); extensionExpressionMock.Expect(mock => mock.Accept(visitor)).Return(expectedResult); extensionExpressionMock.Replay(); var result = visitor.VisitExpression(extensionExpressionMock); extensionExpressionMock.VerifyAllExpectations(); Assert.That(result, Is.SameAs(expectedResult)); }
public void VisitExpression_ExtensionExpression () { var expectedResult = Expression.Constant (0); var visitor = new TestableExpressionTreeVisitor(); var extensionExpressionMock = MockRepository.StrictMock<ExtensionExpression> (typeof (int)); extensionExpressionMock.Expect (mock => mock.Accept (visitor)).Return (expectedResult); extensionExpressionMock.Replay(); var result = visitor.VisitExpression (extensionExpressionMock); extensionExpressionMock.VerifyAllExpectations(); Assert.That (result, Is.SameAs (expectedResult)); }