Uploaded image for project: 'Magnolia UI'
  1. Magnolia UI
  2. MGNLUI-1416

JcrPropertyAdapter should expose changed properties

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 5.0
    • None
    • framework

    Description

      In particular these tests should pass

          @Test
          public void testPropertiesInSync() throws RepositoryException {
      
              // GIVEN
              Node node = session.getRootNode();
              node.setProperty(propertyName, propertyValue);
              JcrPropertyAdapter adapter = new JcrPropertyAdapter(node.getProperty(propertyName));
      
              Property itemProperty1 = adapter.getItemProperty(JcrPropertyAdapter.VALUE_PROPERTY);
              Property itemProperty2 = adapter.getItemProperty(JcrPropertyAdapter.VALUE_PROPERTY);
      
              itemProperty1.setValue("changed");
      
              assertTrue(itemProperty2.getValue().equals("changed"));
          }
      
          @Test
          public void testReturnsUpdatedProperty() throws RepositoryException {
      
              // GIVEN
              Node node = session.getRootNode();
              node.setProperty(propertyName, propertyValue);
              JcrPropertyAdapter adapter = new JcrPropertyAdapter(node.getProperty(propertyName));
      
              Property itemProperty1 = adapter.getItemProperty(JcrPropertyAdapter.VALUE_PROPERTY);
      
              itemProperty1.setValue("changed");
      
              Property itemProperty2 = adapter.getItemProperty(JcrPropertyAdapter.VALUE_PROPERTY);
      
              assertTrue(itemProperty2.getValue().equals("changed"));
          }
      

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                tmattsson Tobias Mattsson
                tmattsson Tobias Mattsson
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Bug DoR
                    Task DoD