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.

Respuesta :

The 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 are:

 

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)