ModelBuilder.UnitTests.ArrayTypeCreatorTests.CreateValidatesWhetherTypeIsSupportedTest C# (CSharp) Method

CreateValidatesWhetherTypeIsSupportedTest() private method

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

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

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