示例#1
0
            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);
        }
示例#3
0
        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);
        }
示例#4
0
        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);
        }
示例#5
0
 private void Visit(ISSTNode node)
 {
     node.Accept(_sut, DefaultArgument);
 }
示例#6
0
        private void AssertAnonymization(ISSTNode expr, ISSTNode expected)
        {
            var actual = expr.Accept(_sut, 0);

            Assert.AreEqual(expected, actual);
        }