ModelBuilder.UnitTests.RandomGeneratorTests.NextValueWithTypeReturnsRandomValueTest C# (CSharp) Method

NextValueWithTypeReturnsRandomValueTest() private method

private NextValueWithTypeReturnsRandomValueTest ( Type type, bool typeSupported, double min, double max ) : void
type Type
typeSupported bool
min double
max double
return void
        public void NextValueWithTypeReturnsRandomValueTest(Type type, bool typeSupported, double min, double max)
        {
            if (typeSupported == false)
            {
                return;
            }

            var target = new RandomGenerator();

            var actual = target.NextValue(type, min, max);

            var converted = Convert.ToDouble(actual);

            converted.Should().BeGreaterOrEqualTo(min);
            converted.Should().BeLessOrEqualTo(max);
        }