public void Should_append_plugin_after_last_of_type_when_it_exists_and_not_append( [Values(true, false)] bool @default) { var plugin1a = Plugin <IPluginType> .Create <Plugin1>(); var plugin1b = Plugin <IPluginType> .Create(new Plugin1()); var plugin2 = Plugin <IPluginType> .Create <Plugin2>(); var append = Plugin <IPluginType> .Create <Plugin3>(); _plugins.Append(plugin1a).Append(plugin1b).Append(plugin2); _plugins.AppendAfterOrAppend <Plugin1>(append, @default) .ShouldOnlyContain(plugin1a, plugin1b, append, plugin2); _plugins.IsDefault(append).ShouldEqual(@default); }
public PluginsDsl <TPlugin> AfterOrAppend <TFind>() where TFind : TPlugin { Plugins.AppendAfterOrAppend <TFind>(_plugin); return(this); }