static IAssembly GetAssemblyWithTypes(params IType[] types) { var assembly = new AssemblyStub("Test.Assembly.dll"); var module = new ModuleStub("Module1"); assembly.GetModulesHandler = () => new[] { module }; module.GetTypesHandler = () => types; return assembly; }
public void Should_remember_current_module() { var handler = new TestHandler(); IModule activeModule = null; handler.OnBeginModule = x => activeModule = x; var module = new ModuleStub("TestModule"); handler.BeginModule(module); activeModule.ShouldBeSameAs(module); }