public void Verify(Expression <Action <AbstractNodeVisitor <int> > > fun) { var visitor = Mock.Of <AbstractNodeVisitor <int> >(); _node.Accept(visitor, _context); Mock.Get(visitor).Verify(fun); }
private void AssertReturn(ISSTNode node) { var actual = node.Accept(_sut, DefaultArgument); const int expected = 0; Assert.AreEqual(expected, actual); }
private void TestPrintingWithHighlightingProducesValidXaml(ISSTNode sst) { var context = new XamlSSTPrintingContext(); sst.Accept(_sut, context); var actual = context.ToString(); // throws and fails test if markup is invalid XamlUtils.CreateDataTemplateFromXaml(actual); }
protected void AssertPrintWithCustomContext(ISSTNode sst, SSTPrintingContext context, string expected) { var indentationLevel = context.IndentationLevel; sst.Accept(_sut, context); var actual = context.ToString(); Assert.AreEqual(expected, actual); Assert.AreEqual(indentationLevel, context.IndentationLevel); }
private void Visit(ISSTNode node) { node.Accept(_sut, DefaultArgument); }
private void AssertAnonymization(ISSTNode expr, ISSTNode expected) { var actual = expr.Accept(_sut, 0); Assert.AreEqual(expected, actual); }