public void It_Should_Register_A_Filter() { // Arrange const string key = "upcase"; FilterRegistry filterRegistry = new FilterRegistry(); // Act filterRegistry.Register <UpCaseFilter>(key); var filterType = filterRegistry.Find(key); // Assert Assert.Equal(typeof(UpCaseFilter), filterType); }
public void It_Should_Register_A_Filter() { // Arrange const string key = "upcase"; FilterRegistry filterRegistry = new FilterRegistry(); // Act filterRegistry.Register<UpCaseFilter>(key); var filterType = filterRegistry.Find(key); // Assert Assert.That(filterType, Is.EqualTo(typeof(UpCaseFilter))); }
public void DefineFilter <T>(String name) where T : IFilterExpression { _filterRegistry.Register <T>(name); }