This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Testing and the fly likes Problem with Assert.assertEquals assertion in testing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » Testing
Bookmark "Problem with Assert.assertEquals assertion in testing" Watch "Problem with Assert.assertEquals assertion in testing" New topic
Author

Problem with Assert.assertEquals assertion in testing

preethi kumar
Ranch Hand

Joined: Jun 04, 2010
Posts: 50



I am getting a Assertion error even though the 2 strings are same? any idea how can i do proper Assertion?
preethi kumar
Ranch Hand

Joined: Jun 04, 2010
Posts: 50
Any idea?
Junilu Lacar
Bartender

Joined: Feb 26, 2001
Posts: 4442
    
    5

preethi kumar wrote:
I am getting a Assertion error even though the 2 strings are same? any idea how can i do proper Assertion?

Are you sure they are the same? JUnit doesn't lie. What assertion error messages are you getting? Maybe the actual values have spaces or something that make it only look like they're the same as your expected values.


Junilu - [How to Ask Questions] [How to Answer Questions]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with Assert.assertEquals assertion in testing
 
Similar Threads
Basic question on JUnit Test Suite
assertion
Assertion from witscale website
Mock static method
timezone woes