예제 #1
0
        public void String_properties_exposed_correctly()
        {
            var row =
                new object[]
            {
                "catalog",
                "schema",
                "name",
                "retType",
                null,
                null,
                null,
                null,
                null,
                "paramName",
                "paramType",
                "paramDirection"
            };

            var view = new FunctionDetailsV3RowView(row);

            Assert.Equal("catalog", view.Catalog);
            Assert.Equal("schema", view.Schema);
            Assert.Equal("name", view.ProcedureName);
            Assert.Equal("retType", view.ReturnType);
            Assert.Equal("paramName", view.ParameterName);
            Assert.Equal("paramType", view.ParameterType);
            Assert.Equal("paramDirection", view.ProcParameterMode);
        }
        public void String_properties_exposed_correctly()
        {
            var row =
                new object[]
                    {
                        "catalog",
                        "schema",
                        "name",
                        "retType",
                        null,
                        null,
                        null,
                        null,
                        null,
                        "paramName",
                        "paramType",
                        "paramDirection"
                    };

            var view = new FunctionDetailsV3RowView(row);

            Assert.Equal("catalog", view.Catalog);
            Assert.Equal("schema", view.Schema);
            Assert.Equal("name", view.ProcedureName);
            Assert.Equal("retType", view.ReturnType);
            Assert.Equal("paramName", view.ParameterName);
            Assert.Equal("paramType", view.ParameterType);
            Assert.Equal("paramDirection", view.ProcParameterMode);
        }
예제 #3
0
        public void IsParameterXXXNull_properties_return_false_for_non_DBNull_values()
        {
            var view =
                new FunctionDetailsV3RowView(Enumerable.Repeat("test", 12).ToArray());

            Assert.False(view.IsParameterNameNull);
            Assert.False(view.IsParameterTypeNull);
            Assert.False(view.IsParameterModeNull);
        }
예제 #4
0
        public void IsParameterXXXNull_properties_return_true_for_DBNull_values()
        {
            var view =
                new FunctionDetailsV3RowView(Enumerable.Repeat(DBNull.Value, 12).ToArray());

            Assert.True(view.IsParameterNameNull);
            Assert.True(view.IsParameterTypeNull);
            Assert.True(view.IsParameterModeNull);
        }
        public void IsBuiltIn_property_exposed_correctly()
        {
            const int isBuiltInIndex = 6;
            var row = new object[12];
            var view = new FunctionDetailsV3RowView(row);

            row[isBuiltInIndex] = false;
            Assert.False(view.IsBuiltIn);
            row[isBuiltInIndex] = true;
            Assert.True(view.IsBuiltIn);
        }
        public void IsComposable_property_exposed_correctly()
        {
            const int isComposableIndex = 5;
            var row = new object[12];
            var view = new FunctionDetailsV3RowView(row);

            row[isComposableIndex] = false;
            Assert.False(view.IsComposable);
            row[isComposableIndex] = true;
            Assert.True(view.IsComposable);
        }
예제 #7
0
        public void IsBuiltIn_property_exposed_correctly()
        {
            const int isBuiltInIndex = 6;
            var       row            = new object[12];
            var       view           = new FunctionDetailsV3RowView(row);

            row[isBuiltInIndex] = false;
            Assert.False(view.IsBuiltIn);
            row[isBuiltInIndex] = true;
            Assert.True(view.IsBuiltIn);
        }
예제 #8
0
        public void IsComposable_property_exposed_correctly()
        {
            const int isComposableIndex = 5;
            var       row  = new object[12];
            var       view = new FunctionDetailsV3RowView(row);

            row[isComposableIndex] = false;
            Assert.False(view.IsComposable);
            row[isComposableIndex] = true;
            Assert.True(view.IsComposable);
        }
예제 #9
0
        public void DbNull_converted_to_default_values()
        {
            var view =
                new FunctionDetailsV3RowView(Enumerable.Repeat(DBNull.Value, 12).ToArray());

            Assert.Null(view.Catalog);
            Assert.Null(view.Schema);
            Assert.Null(view.ProcedureName);
            Assert.Null(view.ReturnType);
            Assert.False(view.IsIsAggregate);
            Assert.False(view.IsBuiltIn);
            Assert.False(view.IsComposable);
            Assert.False(view.IsNiladic);
            Assert.False(view.IsTvf);
            Assert.Null(view.ParameterName);
            Assert.Null(view.ParameterType);
            Assert.Null(view.ProcParameterMode);
        }
        public void IsParameterXXXNull_properties_return_false_for_non_DBNull_values()
        {
            var view =
                new FunctionDetailsV3RowView(Enumerable.Repeat("test", 12).ToArray());

            Assert.False(view.IsParameterNameNull);
            Assert.False(view.IsParameterTypeNull);
            Assert.False(view.IsParameterModeNull);
        }
        public void IsParameterXXXNull_properties_return_true_for_DBNull_values()
        {
            var view =
                new FunctionDetailsV3RowView(Enumerable.Repeat(DBNull.Value, 12).ToArray());

            Assert.True(view.IsParameterNameNull);
            Assert.True(view.IsParameterTypeNull);
            Assert.True(view.IsParameterModeNull);
        }
        public void DbNull_converted_to_default_values()
        {
            var view =
                new FunctionDetailsV3RowView(Enumerable.Repeat(DBNull.Value, 12).ToArray());

            Assert.Null(view.Catalog);
            Assert.Null(view.Schema);
            Assert.Null(view.ProcedureName);
            Assert.Null(view.ReturnType);
            Assert.False(view.IsIsAggregate);
            Assert.False(view.IsBuiltIn);
            Assert.False(view.IsComposable);
            Assert.False(view.IsNiladic);
            Assert.False(view.IsTvf);
            Assert.Null(view.ParameterName);
            Assert.Null(view.ParameterType);
            Assert.Null(view.ProcParameterMode);
        }