8.4 Give SubAssemblies Logical Responsibilities

SubAssembies provide a very convenient means to co-locate like responsibilities into a single place. For example, have a ParsingSubAssembly and a RulesSubAssembly, where the first is responsible solely for parsing incoming Tuple streams (log files for example), and the second applies rules to decide if a given Tuple should be discarded or marked as bad.

Further, in your unit tests, you can create an TestAssertionsSubAssembly, that just inlines various ValueAssertions and GroupAssertions. Inlining Assertions directly in your SubAssemblies is also very important, but sometimes it makes sense to have more tests outside of the business logic.

Copyright © 2007-2008 Concurrent, Inc. All Rights Reserved.