ModelBuilder.UnitTests.StringValueGeneratorTests.GenerateReturnsValidatesTypeSupportTest C# (CSharp) Method

GenerateReturnsValidatesTypeSupportTest() private method

private GenerateReturnsValidatesTypeSupportTest ( Type type, bool supported ) : void
type System.Type
supported bool
return void
        public void GenerateReturnsValidatesTypeSupportTest(Type type, bool supported)
        {
            var target = new StringValueGenerator();

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

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