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

JcrPropertyAdapter should expose changed properties

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 5.0
    • None
    • framework
    • Beta 3

      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"));
          }
      

        Acceptance criteria

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

                Created:
                Updated:
                Resolved: