public void GetFirstInstance() { TestPlugin plugin1 = new TestPlugin(); TestPlugin plugin2 = new TestPlugin(); Assert.AreSame(Plugin.Instances.First(), plugin1); plugin1.Dispose(); plugin2.Dispose(); }
public void RemoveAfterDispose() { TestPlugin plugin = new TestPlugin(); plugin.Dispose(); Assert.Throws<InvalidOperationException>(() => Plugin.Instances.First()); }
public void GetInstance() { TestPlugin plugin = new TestPlugin(); Assert.AreSame(Plugin.Instances[0], plugin); plugin.Dispose(); }