예제 #1
0
 public void AfterTest()
 {
     // null everything!
     keyboardModule = null;
     keyboardInteractEventProducer = null;
     container.Dispose();
     container             = null;
     hookNativeMethodsMock = null;
 }
예제 #2
0
        public void BeforeTest()
        {
            //initialize module, producers and configuration
            keyboardModule = new KeyboardModule();
            keyboardInteractEventProducer = new KeyboardInteractEventProducer();

            // initialize the container and fulfill the MEF inports exports
            container = new CompositionContainer();
            container.ComposeExportedValue(keyboardInteractEventProducer);
            container.ComposeParts(keyboardModule);

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