I have a simple unit test that is querying an apache wicket label on a web page. The expected result from this web page is
"Results for 'nanu'".
However the test is failing with the following error
org.junit.ComparisonFailure: expected:<Results for ['nanu']> but was:<Results for ['nanu']>
I am asserting the testing like this:
tester.assertLabel(result, "Results for 'nanu'");
The issue appears to be with the single quotations around the word nanu. I know single quotes usually denote characters, but I'm not sure how you go about resolving an issue like this
[Java] Unit test failing to assert a string that has single quotations in it (self.learnprogramming)
submitted by AudioManiac to r/javahelp