View Javadoc
1 /* 2 * Angkor Web Framework 3 * 4 * Distributable under LGPL license. 5 * See terms of license at gnu.org. 6 */ 7 package com.tirsen.angkor.test.unit.mock; 8 9 import com.tirsen.angkor.Component; 10 import com.tirsen.angkor.RenderContext; 11 import com.tirsen.angkor.test.unit.TestUtility; 12 13 import java.io.IOException; 14 15 import junit.framework.Assert; 16 17 /*** 18 * TODO document MockComponent 19 * 20 * <!-- $Id: MockComponent.java,v 1.1 2002/10/13 19:59:23 tirsen Exp $ --> 21 * 22 * @author $Author: tirsen $ 23 * @version $Revision: 1.1 $ 24 */ 25 public class MockComponent extends Component 26 { 27 public MockComponent() 28 { 29 } 30 31 public void render(RenderContext context) throws IOException 32 { 33 getRenderContext().emptyTag("a id="+ getId() + ""); 34 } 35 36 public void assertRenderedCorrectly(MockServletResponse mockServletResponse) 37 { 38 Assert.assertNotNull(TestUtility.selectElement(mockServletResponse.getResultingDocument(), "//a[@id='" + getId() + "']")); 39 } 40 }

This page was automatically generated by Maven