Class BlockAssert
- java.lang.Object
-
- org.xwiki.rendering.test.integration.junit5.BlockAssert
-
public class BlockAssert extends Object
Class to be imported in JUnit5 unit tests as a static import and which contains helper methods to assert Rendering Blocks.- Since:
- 11.6RC1
- Version:
- $Id: 87738f40a654d07036f991fe4cc8177389a22712 $
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
BlockAssert()
Protect constructor since it is a static only class.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
assertBlocks(String expected, List<Block> blocks, PrintRendererFactory factory)
static void
assertBlocksStartsWith(String expectedPrefix, List<Block> blocks, PrintRendererFactory factory)
-
-
-
Method Detail
-
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
-
-