public void OverwriteExistingFilter() { var pipeline = new TextFilterPipeline("Append BAR"); Assert.AreEqual("FOOBAR", pipeline.Execute("FOO")); TextFilterPipeline.AddType(typeof(OverwriteFilterTestClass)); // This should overwrite Core.Append Assert.AreEqual("FOOBAZ", pipeline.Execute("FOO")); }
public void LoadCustomFiltersFromTypeWithCategoryName() { TextFilterPipeline.AddType("something", typeof(CustomFilters)); Assert.IsTrue(TextFilterPipeline.CommandMethods.ContainsKey("something.mymethod")); var pipeline = new TextFilterPipeline(); pipeline.AddCommand("something.MyMethod"); Assert.AreEqual("MyMethod", pipeline.Execute()); }