Esempio n. 1
0
        public void AddOneUserOneOrder()
        {
            this.AddOneUser();
            DataRow row = orders.Generate();

            this.db.Orders.Rows.Add(row);
        }
Esempio n. 2
0
        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
                );
        }
Esempio n. 3
0
        public void AddOrder()
        {
            ITablePopulator orders = this.pop.Tables[this.db.Orders];

            this.db.Orders.Rows.Add(orders.Generate());
            Console.WriteLine("AddOrder");
            this.Check();
        }
Esempio n. 4
0
        public void AddProduct()
        {
            ITablePopulator products = this.pop.Tables[this.db.Products];

            this.db.Products.Rows.Add(products.Generate());
            Console.WriteLine("AddProduct");
            this.Check();
        }
Esempio n. 5
0
        public void AddOneUserOneOrderOneProduct()
        {
            this.AddOneUserOneOrder();

            DataRow row = products.Generate();

            this.db.Products.Rows.Add(row);
        }
Esempio n. 6
0
 public void AddOneOrderProduct()
 {
     DataRow row = orderProducts.Generate();
 }
Esempio n. 7
0
        public void AddOneUser()
        {
            DataRow row = users.Generate();

            this.db.Users.Rows.Add(row);
        }