Thursday, 12 September 2013

How to assert greater than using JUnit Assert?

How to assert greater than using JUnit Assert?

I have these values coming from a test
previousTokenValues[1] = "1378994409108"
currentTokenValues[1] = "1378994416509"
and I try
// current timestamp is greater
assertTrue(Long.parseLong(previousTokenValues[1]) >
Long.parseLong(currentTokenValues[1]));
I get the java.lang.AssertionError and detailMessage on debugging is null.
How can I assert greater than conditions in using JUnit

No comments:

Post a Comment