public void StoresAndRetrievesModelItem()
        {
            TestSessionModelPersistenceMedium pm = new TestSessionModelPersistenceMedium();
            Control tuc = new TestUserControl("TucID");
            pm.SaveToMedium( tuc, this );
            // ensure key was generated by GetKey() and Item was added to storage
            Assert.AreEqual( this, pm.SessionItems["TucID"] );

            // ensure key was generated by GetKey() and Item is retrieved from storage
            Assert.AreEqual( this, pm.LoadFromMedium( tuc ) );
        }
Beispiel #2
0
        public void StoresAndRetrievesModelItem()
        {
            TestSessionModelPersistenceMedium pm = new TestSessionModelPersistenceMedium();
            Control tuc = new TestUserControl("TucID");

            pm.SaveToMedium(tuc, this);
            // ensure key was generated by GetKey() and Item was added to storage
            Assert.AreEqual(this, pm.SessionItems["TucID"]);

            // ensure key was generated by GetKey() and Item is retrieved from storage
            Assert.AreEqual(this, pm.LoadFromMedium(tuc));
        }