|
|||||||||||||||||||
| Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover. | |||||||||||||||||||
| Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
| MockComponent.java | - | 100% | 100% | 100% |
|
||||||||||||||
| 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 | 2 |
public MockComponent() |
| 28 |
{
|
|
| 29 |
} |
|
| 30 |
|
|
| 31 | 1 |
public void render(RenderContext context) throws IOException |
| 32 |
{
|
|
| 33 | 1 |
getRenderContext().emptyTag("a id="+ getId() + "");
|
| 34 |
} |
|
| 35 |
|
|
| 36 | 1 |
public void assertRenderedCorrectly(MockServletResponse mockServletResponse) |
| 37 |
{
|
|
| 38 | 1 |
Assert.assertNotNull(TestUtility.selectElement(mockServletResponse.getResultingDocument(), "//a[@id='" + getId() + "']")); |
| 39 |
} |
|
| 40 |
} |
|
| 41 |
|
|
||||||||||