Uploaded image for project: 'Hippo Repository'
  1. Hippo Repository
  2. REPO-1412

Improve MockPropertyDefinition regarding some unsupported getter methods

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.2.0
    • Labels:
    • Similar issues:

      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

            • Assignee:
              adouma Ate Douma
              Reporter:
              wko Woonsan Ko
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: