Code Tester

There are two types of tests: unit tests and test suites.

A unit test has a function to be tested, a list of inputs, and a list of expected outputs. A run method applies the function to each input and compares it to the corresponding expected output. It returns the number of failed comparisons.

A test suite contains one or more tests. Its run method calls the run method of each member, returning the number of failures.

Labs

Draw a class diagram modeling Code Tester.

Implement Code Tester.

Hint: Consider using lambdas!