public void NamespaceBasedPipeline_Should_Create_Processors_Using_Order_Attribute_When_Creating_From_Related_Test_Folder() { var processors = new NamespacePipeline(InitialTestFolder) .GetProcessors(); processors.ElementAt(0) .Should() .BeOfType <TestZeroProcessor>("it has an order attribute equal to 0 which is the smallest value"); }
public void NamespaceBasedPipeline_Should_Create_Processors_Of_Same_Order_Attribute_Sorted_By_Name_When_Creating_From_Related_Test_Folder() { var processors = new NamespacePipeline(OrderTestFolder) .GetProcessors(); processors.ElementAt(0) .Should() .BeOfType <TestProcessorOrder1>("comparing strings this should be the first one") .And .NotBeOfType <TestProcessorOrder1Additional>("comparing strings this processor has word additional"); }
public void NamespaceBasedPipeline_Should_Run_With_Extension_Methods_Without_Errors() { var mockRunner = new Mock <Runner>(null, null, null, null) { CallBase = true }; new NamespacePipeline(OrderTestFolder).Run(runner: mockRunner.Object); var expectedCount = new NamespacePipeline(OrderTestFolder).GetProcessors().Count(); mockRunner.Verify(x => x.Run(It.IsAny <IProcessor>(), It.IsAny <Bag>()), Times.Exactly(expectedCount), "Method run processor should be executed, since pipeline has processors"); }