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