Versions Compared

Key

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

...

 The customized mock objects that we provide to be able to setup an environment for Magnolia tests can be found in package info.magnolia.test.mock.

When creating a hierarchy manager you can either initialize it from a file:

Code Block

main@type = mgnl:content
main@uuid = 1

main/uuidLink@type = mgnl:contentNode
main/uuidLink@uuid = 2
main/uuidLink.MetaData.mgnl\:template = someParagraphName
main/uuidLink.MetaData.mgnl\:authorid = superuser
main/uuidLink.MetaData.mgnl\:activatorid = superuser
main/uuidLink.MetaData.mgnl\:title = myTitle
main/uuidLink.link1 = 3

main/linkTarget@type = mgnl:content
main/linkTarget@uuid = 3
main/linkTarget.prop1 = sub2value1
main/linkTarget.prop2 = sub2value2
main/linkTarget.prop3 = boolean:false

main/content@type = mgnl:contentNode
main/content@uuid = 4
main/content.value = Content Value

or you can create a variable with the data or pass it to the method call directly:

Code Block

public final String CONTENT = ""
+ "main/content@type = mgnl:contentNode"
+ "main/content@uuid = 4"

+ "main/content.value = Content Value";