[jboss-user] [JBoss jBPM] - Problem with graph elements comparing

yamert do-not-reply at jboss.com
Wed Mar 21 06:15:39 EDT 2007


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...

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4030164#4030164

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4030164

More information about the jboss-user mailing list