org.xwiki.rendering.test
Class BlockAssert
java.lang.Object
org.xwiki.rendering.test.BlockAssert
public class BlockAssert
- extends Object
Class to be imported in unit tests as a static import and which contains helper methods to assert Rendering Blocks.
- Since:
- 2.4M2
- Version:
- $Id: 9052d666f6cbd35c9f290cc25bf00c78f30a0e17 $
|
Constructor Summary |
protected |
BlockAssert()
Protect constructor since it is a static only class. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BlockAssert
protected BlockAssert()
- Protect constructor since it is a static only class.
assertBlocks
public static void assertBlocks(String expected,
List<Block> blocks,
PrintRendererFactory factory)
- Parameters:
expected - the expected value of passed Blocks when rendered using the passed Renderer Factoryblocks - the Blocks to assertfactory - the Renderer Factory to use to serialize the passed Block and to compare them with the passed
String
assertBlocksStartsWith
public static void assertBlocksStartsWith(String expectedPrefix,
List<Block> blocks,
PrintRendererFactory factory)
- Parameters:
expectedPrefix - the expected prefix of the passed Blocks when rendered using the passed Renderer Factoryblocks - the Blocks to assertfactory - the Renderer Factory to use to serialize the passed Block and to compare them with the passed
String- Since:
- 4.2M1
Copyright © 2004–2014 XWiki. All rights reserved.