public AsyncMethodManagerTest()
        {
            plugin = MockRepository.GenerateMock<DummyPlugin>();
            method = MockRepository.GenerateMock<IAsyncMethod>();

            // Set Up Stub
            method.Expect(m => m.RunAsync()).Do(
                new Action(() => method.Raise(m => m.MethodStarted += null, this, new DoWorkEventArgs(null))));

            plugin.Expect(p => p.AbortableMethod(null))
                .IgnoreArguments()
                .CallOriginalMethod(OriginalCallOptions.NoExpectation);

            plugin.Expect(p => p.NonAbortableMethod(null))
                .IgnoreArguments()
                .CallOriginalMethod(OriginalCallOptions.NoExpectation);

            manager = new AsyncMethodManager<DummyPlugin>();
            manager.AsyncMethod = method;
        }
 public PluginsCollectionTests()
 {
     plugin = MockRepository.GenerateMock<DummyPlugin>();
     manager = MockRepository.GenerateMock<IAsyncMethodManager<DummyPlugin>>();
     collection = new PluginsCollection<DummyPlugin>(manager) { plugin };
 }