0 Replies Latest reply on Mar 21, 2007 6:15 AM by Kirill Shepitko

    Problem with graph elements comparing

    Kirill Shepitko Newbie


      I have a strange problem with some graph elements comparation in unit tests - such as Nodes, and ProcessDefinitions. Absolutely same entities appear to be different!

      For example, code line like

      assertEquals(processDefinition.getNode("step1"), token.getNode());

      results in
      junit.framework.AssertionFailedError: expected:<TaskNode(step1)> but was:<TaskNode(step1)>

      Rather strange message! According to it, the objects ARE equal!
      But if I use
      assertEquals(processDefinition.getNode("step1").toString(), token.getNode().toString());

      the test passes!

      Can be the reason the fact, that processDefinition is got without persistence (just by parsing XML), and token originates from process instance from DB? But definitions are the same...