nunit/nunit — pull request #258 by CharliePoole (2014-10-02 18:58:46+00:00)
Title: Issue 223 - Common Code

This PR fixes #223 by extracting a number of easy-to-combine classes and creating a shared directory structure for them. There are four components in which the shared classes may be used: the Console, Engine and two frameworks (full and lite). Some are shared by only two, some by three of these.

Tests of the common code has also been moved to a common directory and the tests are included for each component where they are used, even though this creates a small amount of duplication when running all tests.

Each file uses conditional compilation to place the shared class into a different namespace depending on where it is being included. This prevents naming conflicts due to the same class existing in different assemblies.

It's possible that this will be replaced at some point in the future by use of Shared Projects, but for now it eliminates a lot of duplication.

The classes put into the common directory are those that were identical, or almost so, across multiple components. There are other areas where a bit more work on refactoring could create additional sharable classes, but that is reserved for when we are actually making changes to those classes. StackTraceFilter and ColorConsole are two items that should be looked at in the future.