public void ThrowsIfTypeDoesNotHaveDefaultConstructor() { PluginLoader loader = new PluginLoader(); AssemblyName assemblyName = GetType().Assembly.GetName(); string typeName = typeof(PluginWithNoDefaultConstructor).FullName; loader.Load(assemblyName, typeName); }
public void ThrowsIfTypeIsNotCompatibleWithNoise() { PluginLoader loader = new PluginLoader(); AssemblyName assemblyName = GetType().Assembly.GetName(); string typeName = GetType().FullName; loader.Load(assemblyName, typeName); }
public void ThrowsIfAssemblyNotFound() { PluginLoader loader = new PluginLoader(); AssemblyName assemblyName = new AssemblyName("OMG u deleted teh asembly u nubcake"); string typeName = typeof(DelayPlugin).FullName; loader.Load(assemblyName, typeName); }
public void ThrowsIfPluginTypeNotFoundInAssembly() { PluginLoader loader = new PluginLoader(); AssemblyName assemblyName = typeof(DelayPlugin).Assembly.GetName(); string typeName = "Sorry, you're not my type"; loader.Load(assemblyName, typeName); }
public void LoadsPluginGivenAssemblyNameAndType() { PluginLoader loader = new PluginLoader(); AssemblyName assemblyName = typeof(DelayPlugin).Assembly.GetName(); string typeName = typeof(DelayPlugin).FullName; INoisePlugin plugin = loader.Load(assemblyName, typeName); Assert.IsTrue(plugin is DelayPlugin); }