Пример #1
0
            public void Should_get_null_given_null_length_and_column_length()
            {
                HbmId id = new HbmId
                {
                    column = new[] { new HbmColumn() }
                };
                int?result = id.GetMaxLength();

                result.ShouldBeNull();
            }
Пример #2
0
            public void Should_get_the_correct_value_from_length_if_not_null()
            {
                const int expected = 16;
                HbmId     id       = new HbmId
                {
                    length = expected.ToString()
                };
                int?result = id.GetMaxLength();

                result.ShouldNotBeNull();
                result.Value.ShouldBeEqualTo(expected);
            }
Пример #3
0
            public void Should_get_the_correct_value_from_column_given_null_length()
            {
                const int expected = 16;
                HbmId     id       = new HbmId
                {
                    column = new[]
                    {
                        new HbmColumn
                        {
                            length = expected.ToString()
                        }
                    }
                };
                int?result = id.GetMaxLength();

                result.ShouldNotBeNull();
                result.Value.ShouldBeEqualTo(expected);
            }