Пример #1
0
 public void AfterTest()
 {
     clipboardModule             = null;
     clipboardCopyEventProducer  = null;
     clipboardPasteEventProducer = null;
     clipboardCutEventProducer   = null;
     nativeClipboard             = null;
     container.Dispose();
     container         = null;
     hookNativeMethods = null;
 }
Пример #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);

            nativeClipboard = new NativeClipboardMock();

            hookNativeMethods = new HookNativeMethodsMock();
            hookNativeMethods.Initialize();
        }