Example #1
0
        public void TestSession03_WithAttachAndEmptySession()
        {
            Assert.That(SQLiteSession.Create(dbPrimary, out session), Is.EqualTo(SQLite3.Result.OK));

            Assert.That(SQLiteSession.AttachToTable(session, nameof(TestTable1)), Is.EqualTo(SQLite3.Result.OK));
            Assert.That(SQLiteSession.AttachToTable(session, nameof(TestTable2)), Is.EqualTo(SQLite3.Result.OK));

            Assert.That(SQLiteSession.IsEmptySession(session), Is.True);

            SQLiteSession.Delete(session);
        }
Example #2
0
        public void TestSession04_WithAttachAllAndEmptySession()
        {
            // create a session for "main" database
            Assert.That(SQLiteSession.Create(dbPrimary, out session), Is.EqualTo(SQLite3.Result.OK));

            // attach all tables to it
            Assert.That(SQLiteSession.AttachToTable(session, null), Is.EqualTo(SQLite3.Result.OK));

            // enable watching for changes with this session
            Assert.That(SQLiteSession.Enable(session, SQLiteSession.EnableState.EnableSession), Is.EqualTo(SQLiteSession.EnableState.EnableSession));

            // validate no changes have occurred
            Assert.That(SQLiteSession.IsEmptySession(session), Is.True);

            // done with our session
            SQLiteSession.Delete(session);
        }
Example #3
0
 public void TestSession02_CreateandDeleteSession()
 {
     Assert.That(SQLiteSession.Create(dbPrimary, out session), Is.EqualTo(SQLite3.Result.OK));
     SQLiteSession.Delete(session);
 }