Esempio n. 1
0
 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;
 }
Esempio n. 2
0
        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);
        }