Example #1
0
 public void Insert(DataSet dataSet, Section tableInfos)
 {
     foreach (DataTable table in dataSet.Tables)
     {
         Table tableInfo = tableInfos.GetTable(table.TableName);
         Use(table);
         Insert(table, tableInfo);
     }
 }
Example #2
0
 internal virtual void UpdateColumnTypes(Database database, Section.SectionType sectionType)
 {
     Section section = testCase.GetSection(sectionType);
     foreach (string tableName in section.TableNames)
     {
         Table table = section.GetTable(tableName);
         UpdateColumnTypes(database, table);
     }
 }
Example #3
0
 /// <summary>
 /// テーブルを作成する。
 /// </summary>
 /// <param name="section">このテーブルが属するセクション</param>
 /// <param name="tableName">テーブル名</param>
 internal Table(Section section, string tableName)
 {
     this.section = section;
     this.tableName = tableName;
 }
Example #4
0
 public void ChangeSheet(Sheet sheet)
 {
     this.sheet = sheet;
     this.section = null;
     ChangeCase(Case.Anonymous);
     ChangeTable((Table)null);
 }
Example #5
0
 private void ChangeSection(string value)
 {
     this.section = Author.CreateSection(this.testCase, value);
     ChangeTable((Table)null);
 }
Example #6
0
 protected virtual Table GetTable(Section section, Type cls, string typeName, string defaultTypeName)
 {
     string tableName = GetTableName(section, cls, typeName, defaultTypeName);
     return section.GetTable(tableName);
 }
Example #7
0
 protected virtual Table GetTable(Section section, Type cls, string typeName)
 {
     return GetTable(section, cls, typeName, null);
 }
Example #8
0
 protected ObjectOperatorBase(Section.SectionType sectiontype)
 {
     this.sectiontype = sectiontype;
 }
Example #9
0
        private static string GetTableName(Section section, Type cls, string typeName, string defaultTypeName)
        {
            if (!Strings.IsEmpty(typeName))
            {
                return typeName;
            }

            List<string> tableNames = section.TableNames;
            if (tableNames.Count == 1)
            {
                return tableNames[0];
            }

            if (!Strings.IsEmpty(defaultTypeName))
            {
                return defaultTypeName;
            }

            if (cls != null)
            {
                return cls.Name;
            }

            throw new ConfigException("M_Fixture_Temp_ObjectOperator_GetTableName", section);
        }
Example #10
0
 private static List<string> GetKeyColumns(Section section, DataTable table)
 {
     List<Column> columns = section.GetTable(table.TableName).Columns;
     return GetSearchKey(columns);
 }
Example #11
0
 protected virtual DataSet GetDataSet(Section.SectionType sectionType)
 {
     string[] tableNames = testCase.GetSection(sectionType).TableNames.ToArray();
     tempObjectFactory.SectionType = sectionType;
     return tempObjectFactory.GetObject<DataSet>(tableNames);
 }