i using mockito/power mockito unit testing. want mock method 'equalsignorecase' in java.lang.string class.
other methods of java.lang.string should behave is, want mock 'equalsignorecase' method.
could please give example ?
rewrite while
condition calls method. benefits in several ways:
- it's easy mock
- it won't throw exception if
str1
null. - it documents loop trying accomplish.
Comments
Post a Comment