Uploaded image for project: 'Isis'
  1. Isis
  2. ISIS-404

Testing if a "wrapped" Domain Object has been persisted fails

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: core-1.1.0
    • Fix Version/s: core-1.7.0
    • Component/s: Core
    • Labels:
    • Environment:
      Testing against current JUnit viewer snapshot over the 1.0.2 quickstart prototype.

      Description

      While doing tests over factory actions, one assert would be to verify the object has been persisted through the DomainObjectContainer.isPersistent(domainObject) method.

      If the evaluation is done over a wrapped object, it returns false.

      If it's done over the original object, it returns true.

      As an example:

      // Test if the Domain Object has been persisted.
      assertTrue(domainObjectContainer
      .isPersistent(communicationPathAssociatedWithNode));

      // Node must be wrapped for the Apache Isis validators to be executed.
      communicationPathAssociatedWithNode = wrapped(communicationPathAssociatedWithNode);

      assertTrue(domainObjectContainer
      .isPersistent(communicationPathAssociatedWithNode));

      The last assertion fails. The only difference I expected was the validation of the programming model.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              obou Oscar Bou
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: