public void AfterTest() { // null everything! keyboardModule = null; keyboardInteractEventProducer = null; container.Dispose(); container = null; hookNativeMethodsMock = null; }
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(); }