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

Support SNS MockNode creation in testutils

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None
    • 2.26.00-alpha-1, 2.26.00
    • None

    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

            jsheriff Junaidh Kadhar Sheriff
            wko Woonsan Ko (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: