Uploaded image for project: '[Read Only] - Hippo Repository'
  1. [Read Only] - Hippo Repository
  2. REPO-1412

Improve MockPropertyDefinition regarding some unsupported getter methods

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None
    • 3.2.0
    • None

    Description

      How about improving MockNode, MockProperty and MockItemDefinition a bit in the following?

      1. Currently org.onehippo.repository.mock.MockProperty#getDefinition() always creates a new MockPropertyDefinition (child of MockItemDefinition) instance unnecessarily. I think we can keep single member instance in MockProperty.
      2. Currently MockPropertyDefinition (and MockItemDefinition) doesn't implement #isProtected(), #getRequiredType(), #isAutoCreated(), and #isMandatory(). #getRequiredType() can be supported by using MockProperty#type, and the others can simply return false by default. And it can have setter methods. Then unit test can take advantage of them.

      What do you think? Doesn't it look like something someone can contribute?

      ref) community thread: https://groups.google.com/forum/#!topic/hippo-community/xmkUlXNdgGc

      Attachments

        Activity

          People

            adouma Ate Douma
            wko Woonsan Ko (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: