public void TestTemplateWithMultipleOccurancesOfStandardElements() { HtmlImageCreator creator = new HtmlImageCreator(); creator.HtmlTemplate = "<html><body>{name};{name};{name};{name}</body></html>"; String html = creator.InstantiateTemplate(sampleItem1); AssertEqual("<html><body>Delta;Delta;Delta;Delta</body></html>", html); }
public void TestSimpleTemplateWithStandardElements() { HtmlImageCreator creator = new HtmlImageCreator(); creator.HtmlTemplate = "<html><body>{name};{href};{description}</body></html>"; String html = creator.InstantiateTemplate(sampleItem1); AssertEqual("<html><body>Delta;http://www.delta.com;delta delta delta delta</body></html>", html); }
public void TestTemplateWithMixedCaseJoinTags() { HtmlImageCreator creator = new HtmlImageCreator(); creator.HtmlTemplate = "<html><body>{subject:join:, };{Subject:Join:, };" + "{SUBJECT:JOIN:, };{sUbJeCt:JoIn:, }</body></html>"; String html = creator.InstantiateTemplate(sampleItem1); AssertEqual("<html><body>Woman, Jewelry;Woman, Jewelry;" + "Woman, Jewelry;Woman, Jewelry</body></html>", html); }
public void TestTemplateWithMixedStandardElementsAndSingleValueFacets() { HtmlImageCreator creator = new HtmlImageCreator(); creator.HtmlTemplate = "<html><body>{name};{letters}</body></html>"; String html = creator.InstantiateTemplate(sampleItem1); AssertEqual("<html><body>Delta;5</body></html>", html); }
public void TestTemplateWithMixedCaseFacets() { HtmlImageCreator creator = new HtmlImageCreator(); creator.HtmlTemplate = "<html><body>{letters};{Letters};{LETTERS};{LeTtErS}</body></html>"; String html = creator.InstantiateTemplate(sampleItem1); AssertEqual("<html><body>5;5;5;5</body></html>", html); }
public void TestTemplateWithJoinTagSingleValue() { HtmlImageCreator creator = new HtmlImageCreator(); creator.HtmlTemplate = "<html><body>{letters:join:, }</body></html>"; String html = creator.InstantiateTemplate(sampleItem1); AssertEqual("<html><body>5</body></html>", html); }
public void TestTemplateWithJoinTagMultipleValues() { HtmlImageCreator creator = new HtmlImageCreator(); creator.HtmlTemplate = "<html><body>{subject:join:, }</body></html>"; String html = creator.InstantiateTemplate(sampleItem2); AssertEqual("<html><body>Earth, Sky, Water, Explosion</body></html>", html); }
public void TestTemplateWithIndexedTagsOutOfRange() { HtmlImageCreator creator = new HtmlImageCreator(); creator.HtmlTemplate = "<html><body>{subject:0};{subject:1};{subject:2};{subject:3}</body></html>"; String html = creator.InstantiateTemplate(sampleItem1); AssertEqual("<html><body>Woman;Jewelry;;</body></html>", html); }
public void TestTemplateWithFacetNamesWithSpaces() { HtmlImageCreator creator = new HtmlImageCreator(); creator.HtmlTemplate = "<html><body>{launch date}</body></html>"; String html = creator.InstantiateTemplate(sampleItem1); AssertEqual("<html><body>2003-10-03T20:35:00</body></html>", html); }