public void CreateAppropriateDenoiserWhenRequested(string requestedType, Type expectedType) { var factory = new DenoiserFactory(FastNlMeansColoredDenoisingSettings.Default, MedianBlurDenoisingSettings.Default); var denoiser = factory.Create(requestedType); Assert.IsType(expectedType, denoiser); }
public void CreateBypassDenoiserByDefault() { var factory = new DenoiserFactory(FastNlMeansColoredDenoisingSettings.Default, MedianBlurDenoisingSettings.Default); var denoiser = factory.Create(DenoisingSettings.Default.Algorithm); Assert.IsType <BypassDenoiser>(denoiser); }
public void ThrowArgumentExceptionWhenUnknownAlgorithmRequested() { var factory = new DenoiserFactory(FastNlMeansColoredDenoisingSettings.Default, MedianBlurDenoisingSettings.Default); Assert.Throws <ArgumentException>(() => factory.Create("Unknown")); }