Google News
logo
Software Testing - Interview Questions
How to generate test cases for "replace a string" method?
a) If characters in new string > characters in the previous string. None of the characters should get truncated.
 
b) If characters in new string < characters in the previous string. Junk characters should not be added.
 
c) Spaces after and before the string should not be deleted.
 
d) String should be replaced only for the first occurrence of the string.
Advertisement