File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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: 4419
    
    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
assertion
timezone woes
Basic question on JUnit Test Suite
Assertion from witscale website
Mock static method