Page History
...
General Setup | Specifics | Preferred Approach | Example |
---|---|---|---|
Class under tests operates on JCR Node | only few calls to common methods of the Node | use MockNode if it supports those calls, Mockito mock else | |
need a simple hierarchy of Nodes | directly use MockNode()MockNode if it supports those calls, Mockito mock else | ||
need a simple hierarchy of Nodes but with several properties | use SessionTestUtil to instantiate MockSession + MockNodes from propertiesStream or String | ||
need a complex hierarchy of Nodes, real NodeTypes or issue real queries | use RepositoryTestCase |
...
Overview
Content Tools