Ejemplo n.º 1
0
 public void StandardTagWithTextInSameLine()
 {
     String source = "tag1 sample text";
     String expectation = "<tag1>\n\tsample text\n</tag1>\n";
     TemplateEngine engine = new TemplateEngine(source, new { });
     String output = engine.Render();
     Assert.AreEqual(expectation, output);
 }
Ejemplo n.º 2
0
 public void StandardTagWithAttribute()
 {
     String source = "tag1(foo=\"bar\", bar=\"foo\")";
     String expectation = "<tag1 foo=\"bar\" bar=\"foo\"/>\n";
     TemplateEngine engine = new TemplateEngine(source, new { });
     String output = engine.Render();
     Assert.AreEqual(expectation, output);
 }
Ejemplo n.º 3
0
 public void StandardTag()
 {
     String source = "tag1\n\ttag2";
     String expectation = "<tag1>\n\t<tag2/>\n</tag1>\n";
     TemplateEngine engine = new TemplateEngine(source, new { });
     String output = engine.Render();
     Assert.AreEqual(expectation, output);
 }
Ejemplo n.º 4
0
 public void DivTagWithId()
 {
     String source = "#car1";
     String expectation = "<div id=\"car1\"/>\n";
     TemplateEngine engine = new TemplateEngine(source, new { });
     String output = engine.Render();
     Assert.AreEqual(expectation, output);
 }
Ejemplo n.º 5
0
 public void DivTagWithClassIdAndOtherAttributes()
 {
     String source = ".car#car1(color=\"red\")";
     String expectation = "<div id=\"car1\" class=\"car\" color=\"red\"/>\n";
     TemplateEngine engine = new TemplateEngine(source, new { });
     String output = engine.Render();
     Assert.AreEqual(expectation, output);
 }
Ejemplo n.º 6
0
 public void DivTagWithClass()
 {
     String source = ".car";
     String expectation = "<div class=\"car\"/>\n";
     TemplateEngine engine = new TemplateEngine(source, new { });
     String output = engine.Render();
     Assert.AreEqual(expectation, output);
 }