public void TestShutdownTwice() { IEventModule anotherEventModule = new EventModule(); anotherEventModule.MainThreadId = Thread.CurrentThread.ManagedThreadId; anotherEventModule.Init(); anotherEventModule.ShutDown(); Assert.Throws <InvalidOperationException>(() => anotherEventModule.ShutDown()); }
public void TestInitBeforeSettingMainThreadId() { IEventModule anotherEventModule = new EventModule(); Assert.Throws <InvalidOperationException>(() => anotherEventModule.Init()); }