示例#1
0
        private void addGenerator(string columnName, Type type)
        {
            DataColumn     col = table.Columns.Add(columnName, type);
            IDataGenerator gen = DataGeneratorConverter.FromColumn(col);

            this.generators.Add(gen.GetType(), gen);
        }
        private void addGenerator(Type type, Type expectedGeneratorType)
        {
            DataColumn     col = table.Columns.Add(type.Name, type);
            IDataGenerator gen = DataGeneratorConverter.FromColumn(col);

            Assert.AreEqual(expectedGeneratorType, gen.GetType());
            Assert.AreEqual(type, gen.GeneratedType);
        }
示例#3
0
 protected virtual void PopulateDataGenerators()
 {
     foreach (DataColumn column in this.Table.Columns)
     {
         IDataGenerator gen = DataGeneratorConverter.FromColumn(column);
         this.dataGenerators.Add(gen);
     }
 }