Example #1
0
 public void AfterTest()
 {
     clipboardModule             = null;
     clipboardCopyEventProducer  = null;
     clipboardPasteEventProducer = null;
     clipboardCutEventProducer   = null;
     nativeClipboard             = null;
     clipWinMsgSinkMock          = null;
     container.Dispose();
     container         = null;
     hookNativeMethods = null;
 }
Example #2
0
        public void BeforeTest()
        {
            clipboardModule             = new ClipboardModule();
            clipboardCopyEventProducer  = new ClipboardCopyEventProducer();
            clipboardCutEventProducer   = new ClipboardCutEventProducer();
            clipboardPasteEventProducer = new ClipboardPasteEventProducer();

            container = new CompositionContainer();
            container.ComposeExportedValue(clipboardCopyEventProducer);
            container.ComposeExportedValue(clipboardCutEventProducer);
            container.ComposeExportedValue(clipboardPasteEventProducer);
            container.ComposeParts(clipboardModule);

            clipWinMsgSinkMock = new ClipboardWindowMessageSinkMock();
            hookNativeMethods  = new HookNativeMethodsMock();
            hookNativeMethods.Initialize();
            nativeClipboard = new NativeClipboardMock();
        }