java - Test cases for the below function -
i not familiar unit tests came across question in interview. can me unit test cases , explain output. know need pass parameters negative cases?
unit test function uses following parameters:
reversestring(originalstring, stringtobereversed, stringreverseto, max)
reversestring(originalstring, stringtobereversed, stringreverseto, max)
you need matrix test cases, have test each combination string parameters of empty strings, nulls, depending on implementation evtl. strings contain non english values.
for integer parameter negative, 0 , positive numbers, depending on max means maby should test big number exceeds maximum linit if exists.
the things mentioned may have tested in combination each other. example null original string negativ integer, depend on implementation, if have such loop has combined condition of 2 parameters combination should tested.
Comments
Post a Comment