ModelBuilder.UnitTests.NumericValueGeneratorTests.GenerateValidatesRequestedTypeTest C# (CSharp) Method

GenerateValidatesRequestedTypeTest() private method

private GenerateValidatesRequestedTypeTest ( Type type, bool typeSupported, double min, double max ) : void
type System.Type
typeSupported bool
min double
max double
return void
        public void GenerateValidatesRequestedTypeTest(Type type, bool typeSupported, double min, double max)
        {
            var target = new NumericValueGenerator();

            Action action = () => target.Generate(type, null, null);

            if (typeSupported)
            {
                action.ShouldNotThrow();
            }
            else
            {
                action.ShouldThrow<NotSupportedException>();
            }
        }