public void Create__runs_mulitple_post_processing() { var dive = new Dive(1, 400, 400, "image"); var pixel = (new[] { new Pixel(0, 0), new SkipPixel(1, 2), new SkipPixel(2, 4), new Pixel(3, 4), new Pixel(4, 0) }).ToList(); var postProcess1 = new Mock<IPostProcessing>(); var postProcess2 = new Mock<IPostProcessing>(); var fac = new SampleFactory(); fac.AddPostProcessing(postProcess1.Object); fac.AddPostProcessing(postProcess2.Object); var processedDive = fac.Create(pixel, dive); postProcess1.Verify(pp => pp.Process(processedDive), Times.Once()); postProcess2.Verify(pp => pp.Process(processedDive), Times.Once()); }
public void AddPostProcessing__adds_post_processing() { var postProcessMock = new Mock<IPostProcessing>(); var postProcessObj = postProcessMock.Object; var fac = new SampleFactory(); fac.AddPostProcessing(postProcessObj); fac.PostProcessingFilters.Should().Contain(postProcessObj); }