public void Walk_EmptyAttributeCollection_WritesCorrectAttributes(string hamlLine, string expectedTag)
        {
            var node = new HamlNodeHtmlAttributeCollection(hamlLine);

            var builder = new ClassBuilderMock();
            new HamlNodeHtmlAttributeCollectionWalker(builder, new HamlOptions())
                .Walk(node);

            Assert.That(builder.Build(""), Is.EqualTo(expectedTag));
        }
Exemplo n.º 2
0
        public void Walk_TextNode_AppendsCorrectTag()
        {
            // Arrange
            var content = new HamlLine("Simple content");
            var document = new HamlDocument { new HamlNodeText(content) };

            // Act
            var builder = new ClassBuilderMock();
            new HamlDocumentWalker(builder).Walk(document, "");

            // Assert
            Assert.That(builder.Build(""), Is.EqualTo(content.Content));
        }
Exemplo n.º 3
0
 public void SetUp()
 {
     _classBuilderMock = new ClassBuilderMock();
     _walker = new DummyWalker(_classBuilderMock, new HamlOptions());
 }
Exemplo n.º 4
0
 public void SetUp()
 {
     _mockClassBuilder = new ClassBuilderMock();
     _walker = new HamlNodeTextWalker(_mockClassBuilder, new HamlOptions());
 }
Exemplo n.º 5
0
 public void SetUp()
 {
     _classBuilderMock = new ClassBuilderMock();
     _hamlOptions = new HamlOptions();
     _tagWalker = new HamlNodeTagWalker(_classBuilderMock, _hamlOptions);
 }