Exemplo n.º 1
0
        public void Walk_ComplexPropertyName_CallsCodeSnippetToStringCorrectly(string variableName, string expectedCodeSnippet)
        {
            var node   = new HamlNodeTextVariable(0, variableName);
            var walker = new HamlNodeTextVariableWalker(_mockClassBuilder.Object, new HamlHtmlOptions());

            walker.Walk(node);
            _mockClassBuilder.Verify(x => x.AppendCodeToString(expectedCodeSnippet));
        }
Exemplo n.º 2
0
        public void Walk_SimpleVariableName_CallsAppendVariableCorrectly(string variableName, string expectedCall)
        {
            var node   = new HamlNodeTextVariable(0, variableName);
            var walker = new HamlNodeTextVariableWalker(_mockClassBuilder.Object, new HamlHtmlOptions());

            walker.Walk(node);
            _mockClassBuilder.Verify(x => x.AppendVariable(expectedCall));
        }