Exemplo n.º 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);
            }
Exemplo n.º 2
0
        private void AssertReturn(ISSTNode node)
        {
            var       actual   = node.Accept(_sut, DefaultArgument);
            const int expected = 0;

            Assert.AreEqual(expected, actual);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 5
0
 private void Visit(ISSTNode node)
 {
     node.Accept(_sut, DefaultArgument);
 }
Exemplo n.º 6
0
        private void AssertAnonymization(ISSTNode expr, ISSTNode expected)
        {
            var actual = expr.Accept(_sut, 0);

            Assert.AreEqual(expected, actual);
        }