예제 #1
0
        public void ShouldMapDisconnectedDataStructureToDbParameterAccessor()
        {
            DbParameterAccessor accessor = MySqlTypeConverter.BuildDbParameterAccessorFrom(bigIntcolumnInfo, 0);

            Assert.That(accessor.ActualSqlType, Is.EqualTo(bigIntcolumnInfo.Datatype));
            Assert.That(accessor.DbFieldName, Is.EqualTo(bigIntcolumnInfo.ColumnName));
            Assert.That(accessor.Position, Is.EqualTo(0));
            Assert.That(accessor.DbParameter.Direction, Is.EqualTo(ParameterDirection.Input));
            Assert.That(accessor.DbParameter.Size, Is.EqualTo(bigIntcolumnInfo.Size));
        }
예제 #2
0
        public void ShouldMapSourceColumnToDbParameterAccessorForStringColumn()
        {
            DbParameterAccessor accessor = MySqlTypeConverter.BuildDbParameterAccessorFrom(stringColumnInfo, 0);

            Assert.That(accessor.DbParameter.SourceColumn, Is.EqualTo(stringColumnInfo.ColumnName));
        }
예제 #3
0
        public void ShouldMapRunTimeTypeToDbParameterAccessorForStringColumn()
        {
            DbParameterAccessor accessor = MySqlTypeConverter.BuildDbParameterAccessorFrom(stringColumnInfo, 0);

            Assert.That(accessor.DotNetType, Is.EqualTo(typeof(string)));
        }
예제 #4
0
        public void ShouldMapMySqlTypeToDbParameterAccessorForStringColumn()
        {
            DbParameterAccessor accessor = MySqlTypeConverter.BuildDbParameterAccessorFrom(stringColumnInfo, 0);

            Assert.That(accessor.DbParameter.DbType, Is.EqualTo(DbType.String));
        }
예제 #5
0
        public void ShouldMapMySqlTypeToDbParameterAccessorForBigIntColumn()
        {
            DbParameterAccessor accessor = MySqlTypeConverter.BuildDbParameterAccessorFrom(bigIntcolumnInfo, 0);

            Assert.That(accessor.DbParameter.DbType, Is.EqualTo(DbType.Int64));
        }