public void TestSqliteSessionStateProvider()
        {
            SqliteConnectionStringBuilder conStrBuilder = new SqliteConnectionStringBuilder ();
            SqliteDbServerConnection serverCon = new SqliteDbServerConnection ("test", conStrBuilder.ConnectionString);
            ISessionStateProvider sessionStateProvider = new SqliteSessionStateProvider(serverCon);

            String state = sessionStateProvider.getSerializedState ();

            IDbServerConnection restoredCon = sessionStateProvider.restoreSessionFromState (state);
            Assert.AreEqual (restoredCon, serverCon);
        }
Esempio n. 2
0
        public void TestSqliteSessionStateProvider()
        {
            SqliteConnectionStringBuilder conStrBuilder        = new SqliteConnectionStringBuilder();
            SqliteDbServerConnection      serverCon            = new SqliteDbServerConnection("test", conStrBuilder.ConnectionString);
            ISessionStateProvider         sessionStateProvider = new SqliteSessionStateProvider(serverCon);

            String state = sessionStateProvider.getSerializedState();

            IDbServerConnection restoredCon = sessionStateProvider.restoreSessionFromState(state);

            Assert.AreEqual(restoredCon, serverCon);
        }