ModelBuilder.UnitTests.IPAddressValueGeneratorTests.GenerateValidatesUnsupportedScenariosTest C# (CSharp) Method

GenerateValidatesUnsupportedScenariosTest() private method

private GenerateValidatesUnsupportedScenariosTest ( Type type, string referenceName, bool supported ) : void
type System.Type
referenceName string
supported bool
return void
        public void GenerateValidatesUnsupportedScenariosTest(Type type, string referenceName, bool supported)
        {
            var target = new IPAddressValueGenerator();

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

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