Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

With the help of info.magnolia.test.mock.jcr.SessionTestUtil MockNodes can be created from properties files

Code Block
titlecreate MockNode MockSession from properties file
MockSession session = SessionTestUtil.createSession("test", getClass().getResourceAsStream("sample.properties"));

as well as from String:

Code Block
titlecreate MockContent using APIMockSession from properties String
MockSession session = SessionTestUtil.createSession("testWorkspace",
    "/foo/bar.@type=mgnl:content",
    "/foo/bar/sub1.@uuid=1",
    "/foo/bar/subpath.property=testName");

...