public void GenericActionPipeline_WorksAsExpected() { List <int> list = GenerateRandomIntList(); GenericActionPipeline <int> actionPipeline = new GenericActionPipeline <int>(new List <IActionWrapper <int> > { new TestMappingProcessor(), new TestFoldProcessor(), new TestMappingProcessor() }); IEnumerable <int> result = actionPipeline.Act(list); result.ShouldBeEquivalentTo((new List <int>() { list.Select(TestMappingProcessor.internalFunction).Aggregate(TestFoldProcessor.internalFunction) }).Select(TestMappingProcessor.internalFunction)); }
public SarifLogPipeline(List <SarifLogActionTuple> actions) { this.Actions = actions; _pipeline = new GenericActionPipeline <SarifLog>(Actions.Select(a => SarifLogProcessorFactory.GetActionStage(a.Action, a.Parameters))); }