public void SetUp(DataSet dataSource)
        {
            if (dataSource is NorthwindDataSet)
                Assert.Ignore("Northwind is buggy... because import in VC# is buggy");
            this.Admin.CreateDatabase();

            dataSource.EnforceConstraints = true;
            this.graph = DataGraph.Create(dataSource);

            this.pop = new DatabasePopulator();
            this.pop.Populate(dataSource);

            // add one row data per table
            foreach (DataTable table in this.graph.GetSortedTables())
            {
                ITablePopulator tp = this.pop.Tables[table];
                tp.Generate();
                table.Rows.Add(tp.Row);
                table.AcceptChanges();
            }

            this.gen = new SqlGenerator(
                this.ConnectionString,
                this.DatabaseName,
                dataSource
                );
        }
 public void SetUp()
 {
     this.dataSource = new NullableAndNonNullableRelationDataSet();
     this.graph = DataGraph.Create(dataSource);
     this.edgePredictate = new DataTableSortAlgorithm.NonNullableDataRelationEdgePredicate();
     this.fgraph = new FilteredEdgeListGraph(this.graph,
         this.edgePredictate
         );
 }
        public void Populate()
        {
            // check dataset is not null
            if (this.DataSource==null)
                throw new InvalidOperationException("DataSource not set");

            this.graph = new DataGraph();

            // add tables;
            foreach(DataTable table in this.DataSource.Tables)
            {
                this.graph.AddVertex(table);
            }

            // adding relations
            foreach(DataRelation relation in this.DataSource.Relations)
            {
                this.graph.AddEdge(relation);
            }
        }
 public void SetUp(DataSet dataSource)
 {
     this.graph = DataGraph.Create(dataSource);
     this.topo = new DataTableSortAlgorithm(this.graph);
 }
Пример #5
0
 public DbGenerator(DbAdministratorBase admin, DataSet dataSource)
 {
     this.admin = admin;
     this.dataSource = dataSource;
     this.graph = DataGraph.Create(this.DataSource);
 }
 public DataGraphAlgorithm(DataGraph visitedGraph)
 {
     if (visitedGraph == null)
         throw new ArgumentNullException("visitedGraph");
     this.visitedGraph = visitedGraph;
 }
 public void SetUp()
 {
     this.dataSource = new UserOrderProductDataSet();
     this.graph = DataGraph.Create(dataSource);
     this.joinGraph = new DataJoinGraph(this.graph);
 }
Пример #8
0
 public void SetUp(DataSet dataSource)
 {
     this.graph = DataGraph.Create(dataSource);
 }
 protected virtual void BuildGraph()
 {
     DataGraphPopulator gp = new DataGraphPopulator();
     gp.DataSource = this.DataSet;
     gp.Populate();
     this.graph = gp.Graph;
 }
 public DataTableSortAlgorithm(DataGraph visitedGraph)
     : base(visitedGraph)
 {
 }