You have been asked to test a method called ‘catWhiteSpace’ in a ‘Paragraph’ object that, within the paragraph, replaces sequences of blank characters with a single blank character. Identify testing partitions for this example and derive a set of tests for the ‘catWhiteSpace’ method.

What will be an ideal response?


Testing partitions are:
Strings with only single blank characters
Strings with sequences of blank characters in the middle of the string
Strings with sequences of blank characters at the beginning/end of string
Examples of tests:
The quick brown fox jumped over the lazy dog (only single blanks)
The quick brown fox jumped over the lazy dog (different numbers of
blanks in the sequence)
The quick brown fox jumped over the lazy dog (1st blank is a sequence)
The quick brown fox jumped over the lazy dog (Last blank is a sequence)
The quick brown fox jumped over the lazy dog (2 blanks at beginning)
The quick brown fox jumped over the lazy dog (several blanks at beginning)
The quick brown fox jumped over the lazy dog (2 blanks at end)
The quick brown fox jumped over the lazy dog (several blanks at end)
Etc.

Computer Science & Information Technology

You might also like to view...

Which protocol enables the establishment of a Web connection and provides for the exchange of resources, such as displaying Web pages in your browser?

A. Telnet B. HTTP C. FTP D. SMTP

Computer Science & Information Technology

Ruby provides a number of different loop methods belonging to different classes. These methods simplify loop construction and help to eliminate the chance of errors that can happen when working with language looping constructs.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

Community cloud

What will be an ideal response?

Computer Science & Information Technology

Wireless access point placement is not a significant issue in network design.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology