예제 #1
0
 public void AfterTest()
 {
     // null everything!
     mouseModule              = null;
     mouseClickEventProducer  = null;
     mouseMoveEventProducer   = null;
     mouseScrollEventProducer = null;
     mouseModuleConfiguration = null;
     container.Dispose();
     container             = null;
     hookNativeMethodsMock = null;
 }
예제 #2
0
        public void BeforeTest()
        {
            //initialize module, producers and configuration
            mouseModule              = new MouseModule();
            mouseClickEventProducer  = new MouseClickEventProducer();
            mouseMoveEventProducer   = new MouseMoveEventProducer();
            mouseScrollEventProducer = new MouseScrollEventProducer();
            mouseModuleConfiguration = new TestMouseModuleConfiguration();

            // initialize the container and fulfill the MEF inports exports
            container = new CompositionContainer();
            container.ComposeExportedValue(mouseClickEventProducer);
            container.ComposeExportedValue(mouseMoveEventProducer);
            container.ComposeExportedValue(mouseScrollEventProducer);
            container.ComposeExportedValue(mouseModuleConfiguration);
            container.ComposeParts(mouseModule);

            //initialzie the hookNativeMethodsMock
            hookNativeMethodsMock = new HookNativeMethodsMock();
            hookNativeMethodsMock.Initialize();
        }