private FilterCollection CreateFilterCollection(Type commandType) { var filterTypes = _filterSelector.GetFiltersFor(commandType); var filters = filterTypes.Select(x => _objectFactory.GetHandlerInstance(x)); return(new FilterCollection(filters)); }
public void It_can_find_handler_by_subtype() { var collection = new FilterSelector(typeof(TestCommandFilter)); var filterTypes = collection.GetFiltersFor(typeof(DerivedTestCommand)); Assert.Contains(typeof(TestCommandFilter), filterTypes.ToList()); }