Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem with Assert.assertEquals assertion in testing  RSS feed

 
preethi kumar
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator



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
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any idea?
 
Junilu Lacar
Sheriff
Posts: 10879
158
Android Debian Eclipse IDE IntelliJ IDE Java Linux Mac Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!