public void NextValueWithTypeValidatesRequestedTypeTest(Type type, bool typeSupported, double min, double max) { var target = new RandomGenerator(); Action action = () => target.NextValue(type, min, max); if (typeSupported) { action.ShouldNotThrow(); } else { action.ShouldThrow<NotSupportedException>(); } } }