public void CanAddRemoveFactoryImageProcessors()
        {
            var services = new ServiceCollection();
            IImageSharpBuilder builder = services.AddImageSharp();

            builder.AddProcessor(_ => new MockWebProcessor());
            Assert.Single(services, IsService <IImageWebProcessor, MockWebProcessor>);
            Assert.Single(services, IsServiceImplementationFactory <IImageWebProcessor, MockWebProcessor>);

            builder.RemoveProcessor <MockWebProcessor>();
            Assert.DoesNotContain(services, IsService <IImageWebProcessor, MockWebProcessor>);
        }
        public void CanAddRemoveImageProcessors()
        {
            var services = new ServiceCollection();

            IImageSharpBuilder builder = services.AddImageSharp()
                                         .AddProcessor <MockWebProcessor>();

            Assert.Contains(services, x => x.ImplementationType == typeof(MockWebProcessor));

            builder.RemoveProcessor <MockWebProcessor>();

            Assert.DoesNotContain(services, x => x.ImplementationType == typeof(MockWebProcessor));
        }
        public void CanAddRemoveImageProcessors()
        {
            void RemoveServices(IServiceCollection services)
            {
                IImageSharpBuilder builder = services.AddImageSharp()
                                             .AddProcessor <MockWebProcessor>();

                Assert.Contains(services, x => x.ImplementationType == typeof(MockWebProcessor));

                builder.RemoveProcessor <MockWebProcessor>();

                Assert.DoesNotContain(services, x => x.ImplementationType == typeof(MockWebProcessor));
            }

            using (TestServer server = ImageSharpTestServer.Create(ImageSharpTestServer.DefaultConfig, RemoveServices))
            {
            }
        }