ComparisonFailure on equal(to the eye) strings
Hello!
I have problems with trying to verify a string read from a text file.
* I read in the entire text file and save it as a String (say myStringReadFromFile).
* I manually copy the text from the the text file, and as the text is not so long I paste it into my assertEquals method and adjust it slightly to something like this:
assertEquals("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n"
+ "<Event pointID=\"Alarms\" xmlns=\"ng:event\">\n"
+ "<Header>\n"
+ ...
, myStringReadFromFile);
Now the thing is I get a junit.framework.ComparisonFailure. Using Eclipse, I double click on the failure to open the "Result Comparison" window, but nothing differs the actual from the expected text!
I copy the two text fields manually into two different text files and run a winmerge on them. They are identical..
Any help on how to make things easier..? :)
Thanks!
Staffan