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

Support SNS MockNode creation in testutils

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.26.00-alpha-1, 2.26.00
    • Component/s: None
    • Labels:
    • Similar issues:

      Description

      I'm trying to use MockNode of hippo-repository-testutils. It throws an
      exception when adding SNS child. I see the following in MockNode.java:

      public void addNode(MockNode child) {
      child.setParent(this);
      String childName = child.getName();
      if (children.containsKey(childName))

      { throw new UnsupportedOperationException("Cannot add node '" + childName + "': MockNode does not support same-name siblings"); }

      children.put(childName, child);
      }

      This doesn't look quite right to me. I think we should allow to add SNS
      in MockNode by default and we'd better add methods like
      MockNode#setSameNameSiblingSupported() and
      MockNode#isSameNameSiblingSupported(). Also, static methods can be useful:
      e.g, MockNode#setDefaultSameNameSiblingSupported() and
      #isDefaultSameNameSiblingSupported().

        Attachments

          Activity

            People

            • Assignee:
              jsheriff Junaidh Kadhar Sheriff
              Reporter:
              wko Woonsan Ko
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: