Methods Summary |
---|
protected void | setUp()
super.setUp();
tag = new HeadTag();
tag.setPageContext(pageContext);
|
protected void | tearDown()
super.tearDown();
|
public void | testHead1()
tag.doStartTag();
tag.doEndTag();
verify(HeadTagTest.class.getResource("HeadTagTest-1.txt"));
|
public void | testHead1NoCalender()
tag.doStartTag();
tag.doEndTag();
tag.setCalendarcss(null); // null = should use calendar-blue.css
verify(HeadTagTest.class.getResource("HeadTagTest-1.txt"));
|
public void | testHead2()
tag.setTheme("ajax");
tag.doStartTag();
Head component = (Head) tag.getComponent();
assertTrue(!component.isDebug());
tag.doEndTag();
verify(HeadTagTest.class.getResource("HeadTagTest-2.txt"));
assertTrue("should have debug false", writer.toString().indexOf("isDebug: false") > -1);
|
public void | testHead3()
tag.setTheme("ajax");
tag.setDebug("true");
tag.doStartTag();
Head component = (Head) tag.getComponent(); // must be done between start and end
assertTrue(component.isDebug());
tag.doEndTag();
verify(HeadTagTest.class.getResource("HeadTagTest-3.txt"));
assertTrue("should have debug true", writer.toString().indexOf("isDebug: true") > -1);
|
public void | testHead4()
tag.setCalendarcss("my-calendar");
tag.doStartTag();
tag.doEndTag();
verify(HeadTagTest.class.getResource("HeadTagTest-4.txt"));
assertEquals("my-calendar", tag.getCalendarcss());
|
public void | testHead4b()
tag.setCalendarcss("my-calendar.css");
tag.doStartTag();
Head component = (Head) tag.getComponent(); // must be done between start and end
assertEquals("my-calendar.css", component.getCalendarcss());
tag.doEndTag();
verify(HeadTagTest.class.getResource("HeadTagTest-4.txt"));
assertEquals("my-calendar.css", tag.getCalendarcss());
|