public void TestLoadHandler() { Configuration configuration = TestUtils.InitAssembliesAndNamespaces(); var builder = new TestBuilder(); builder.Append("<table>"); builder.Append("<tr><td colspan=\"2\">cell handler loader</td></tr>"); builder.Append("<tr><td>load</td><td>substring handler</td></tr>"); builder.Append("</table>"); Assert.IsFalse(new Service.Service(configuration).Compare(new TypedValue("abc"), TestUtils.CreateCell("..b.."))); StoryTest test = builder.MakeStoryTest(); test.ExecuteOnConfiguration(configuration); Assert.IsTrue(new Service.Service(configuration).Compare(new TypedValue("abc"), TestUtils.CreateCell("..b.."))); }
public void TestRemoveHandler() { Configuration configuration = TestUtils.InitAssembliesAndNamespaces(); new Service.Service(configuration).AddOperator(new CompareSubstring()); var builder = new TestBuilder(); builder.Append("<table>"); builder.Append("<tr><td colspan=\"2\">CellHandlerLoader</td></tr>"); builder.Append("<tr><td>remove</td><td>SubstringHandler</td></tr>"); builder.Append("</table>"); Assert.IsTrue(new Service.Service(configuration).Compare(new TypedValue("abc"), TestUtils.CreateCell("..b.."))); var test = builder.MakeStoryTest(); test.ExecuteOnConfiguration(configuration); Assert.IsFalse(new Service.Service(configuration).Compare(new TypedValue("abc"), TestUtils.CreateCell("..b.."))); }