private ValidatingTransformManager GetSUT(ColumnTypeInfo col)
        {
            var sut = new ValidatingTransformManager();

            var columnMappings = new Dictionary <string, string>()
            {
                { "D1", "S1" }
            };
            var schema = new Dictionary <string, ColumnTypeInfo>()
            {
                { "D1", col }
            };

            sut.Initialize(columnMappings, "D1", schema);

            return(sut);
        }
Example #2
0
        private TransformManager GetTransformManager(bool validate)
        {
            TransformManager manager;

            if (!validate)
            {
                manager = new TransformManager();
                manager.Initialize(_colMappings, _colMappings.IdColumn);
            }
            else
            {
                var dsh    = new DbSchemaHelper();
                var schema = dsh.GetSchema(_destinationConn, _destinationTable);

                var trans = new ValidatingTransformManager();
                trans.Initialize(_colMappings, _colMappings.IdColumn, schema);
                trans.DataValidationError += new EventHandler <DataValidationErrorEventArgs>(delegate(object sender, DataValidationErrorEventArgs e) { OnDataValidationError(e); });
                manager = trans;
            }

            return(manager);
        }