public void CanReadData()
        {
            using (var table = new JetTestTable(Processor, "id int"))
            {
                AddTestData(table);

                DataSet ds = Processor.Read("SELECT * FROM {0}", table.Name);

                ds.ShouldNotBeNull();
                ds.Tables.Count.ShouldBe(1);
                ds.Tables[0].Rows.Count.ShouldBe(3);
                ds.Tables[0].Rows[2][0].ShouldBe(2);
            }
        }
 public void CallingColumnExistsReturnsFalseIfColumnDoesNotExist()
 {
     using (var table = new JetTestTable(Processor, "id int"))
         Processor.ColumnExists(null, table.Name, "DoesNotExist").ShouldBeFalse();
 }
 private void AddTestData(JetTestTable table)
 {
     for (int i = 0; i < 3; i++)
     {
         var cmd = table.Connection.CreateCommand();
         cmd.Transaction = table.Transaction;
         cmd.CommandText = string.Format("INSERT INTO {0} (id) VALUES ({1})", table.Name, i);
         cmd.ExecuteNonQuery();
     }
 }
 public void CallingColumnExistsReturnsTrueIfColumnExists()
 {
     using (var table = new JetTestTable(Processor, "id int"))
         Processor.ColumnExists(null, table.Name, "id").ShouldBeTrue();
 }
        public void CanReadTableData()
        {
            using (var table = new JetTestTable(Processor, "id int"))
            {
                AddTestData(table);

                DataSet ds = ((DataSetContainer)Processor.ReadTableData(null, table.Name)).DataSet;

                ds.ShouldNotBeNull();
                ds.Tables.Count.ShouldBe(1);
                ds.Tables[0].Rows.Count.ShouldBe(3);
                ds.Tables[0].Rows[2][0].ShouldBe(2);
            }
        }