示例#1
0
        public void ShouldCreateDecimalColumn()
        {
            var properties = new AllTypes().GetProperties().ToArray();

            var builder = new CreateBuilder();
            var sql = builder.GetColumnDetails(properties[6]);

            sql.Should().Be("[Decimal] [decimal(18, 0)]  NOT NULL,");
        }
示例#2
0
        public void ShouldCreateCustomColumn()
        {
            var properties = new AllTypes().GetProperties().ToArray();

            var builder = new CreateBuilder();
            var sql = builder.GetColumnDetails(properties[10]);

            sql.Should().Be("[Custom] [varchar(50)] IDENTITY(1,1) NULL,");
        }
示例#3
0
        public void ShouldCreateDateTimeColumn()
        {
            var properties = new AllTypes().GetProperties().ToArray();

            var builder = new CreateBuilder();
            var sql = builder.GetColumnDetails(properties[2]);

            sql.Should().Be("[DateTime] [datetime]  NOT NULL,");
        }
示例#4
0
        public void ShouldCreateCharColumn()
        {
            var properties = new AllTypes().GetProperties().ToArray();

            var builder = new CreateBuilder();
            var sql = builder.GetColumnDetails(properties[7]);

            sql.Should().Be("[Char] [char(10)]  NOT NULL,");
        }
示例#5
0
        public void ShouldCreateBoolColumn()
        {
            var properties = new AllTypes().GetProperties().ToArray();

            var builder = new CreateBuilder();
            var sql = builder.GetColumnDetails(properties[4]);

            sql.Should().Be("[Boolean] [bit]  NOT NULL,");
        }
示例#6
0
        public void ShouldCreateBigIntColumn()
        {
            var properties = new AllTypes().GetProperties().ToArray();

            var builder = new CreateBuilder();
            var sql = builder.GetColumnDetails(properties[9]);

            sql.Should().Be("[Int64] [bigint]  NOT NULL,");
        }
示例#7
0
        public void ShouldCreateGuidColumn()
        {
            var properties = new AllTypes().GetProperties().ToArray();

            var builder = new CreateBuilder();
            var sql = builder.GetColumnDetails(properties[3]);

            sql.Should().Be("[Guid] [uniqueidentifier]  NOT NULL,");
        }
示例#8
0
        public void ShouldCreateFloatColumn()
        {
            var properties = new AllTypes().GetProperties().ToArray();

            var builder = new CreateBuilder();
            var sql = builder.GetColumnDetails(properties[5]);

            sql.Should().Be("[Float] [float]  NOT NULL,");
        }
示例#9
0
        public void ShouldCreateStringColumn()
        {
            var properties = new AllTypes().GetProperties().ToArray();

            var builder = new CreateBuilder();
            var sql = builder.GetColumnDetails(properties[1]);

            sql.Should().Be("[Name] [varchar](max)  NULL,");
        }
示例#10
0
        public void ShouldCreateIntColumn()
        {
            var properties = new AllTypes().GetProperties().ToArray();

            var builder = new CreateBuilder();
            var sql = builder.GetColumnDetails(properties[0]);

            sql.Should().Be("[Id] [int] IDENTITY(1,1) NOT NULL,");
        }