Monday, June 29, 2009

well this is something new, a very strange behavior in one of my tests cases:


List result = this.getEntityManager().createQuery("from " + LoggingEntityBean.class.getName() + " b").getResultList();
assertTrue(result.isEmpty() == false);

int size = result.size();
int exspected = testSize * addres.length;

logger.info(size);
logger.info(exspected);
assertTrue(size == exspected);


now why do I get this error message...

[17:37:02,007] [INFO ] [main] [LoggingServiceTest] [400]
[17:37:02,008] [INFO ] [main] [LoggingServiceTest] [200]

junit.framework.AssertionFailedError: null
at edu.ucdavis.genomics.metabolomics.binbase.logging.server.LoggingServiceTest.setUp(LoggingServiceTest.java:73)
at org.jmock.core.VerifyingTestCase.runBare(Unknown Source)
at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:81)
at com.intellij.rt.junit4.Junit4ClassSuite.run(Junit4ClassSuite.java:99)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:40)



error in this line:

assertTrue(size == exspected);

ok it's supposed to fail because 200 isn't 400, but not with a NullPointer exception...

1 comment:

Gert Wohlgemuth said...

turns out it's a bug in intellij