Closed GoogleCodeExporter closed 9 years ago
What do you prepare for test?
Original comment by johan.ha...@gmail.com
on 12 Oct 2010 at 5:54
Only the class that is being tested. I tried to prepare StringBuffer but it
didn't help.
Original comment by nisabek
on 13 Oct 2010 at 4:18
The same thing is for StringBuilder.
Original comment by aznaur...@gmail.com
on 13 Oct 2010 at 6:15
BTW, it's impossible to mock toString() method of any object, it's EasyMock
limitation (see
http://easymock.org/EasyMock3_0_Documentation.html#Object_Methods)
Original comment by mishail.mishail
on 14 Oct 2010 at 5:22
Sorry the issue is invalid. the problem was the toString() method and not
mocking of StringBuffer.
What confuses is that the debug shows that the mocked object is of type
StringBuffer and not of EasyMock type. but other expectations (except of
toString) work on it.
Thanks.
Original comment by nisabek
on 14 Oct 2010 at 6:57
Original comment by johan.ha...@gmail.com
on 14 Oct 2010 at 12:21
I am not able to create mock object for StringBuffer, what is the solution for
this??
I am getting the below error!
java.lang.IllegalArgumentException: Cannot subclass final class class
java.lang.StringBuffer
Original comment by avinash....@gmail.com
on 7 Sep 2011 at 10:49
Original issue reported on code.google.com by
nisabek
on 12 Oct 2010 at 1:52