From: Peter S. <sz...@us...> - 2004-09-20 17:46:08
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/CacheTest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24263/CacheTest Modified Files: CacheFixture.cs Log Message: Removed obsolete method Assertion.*, replaced with Assert.*. Reordered asserts. Index: CacheFixture.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate.Test/CacheTest/CacheFixture.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CacheFixture.cs 6 May 2004 20:56:59 -0000 1.1 --- CacheFixture.cs 20 Sep 2004 17:45:59 -0000 1.2 *************** *** 27,31 **** // cache something ! Assertion.Assert( ccs.Put("foo", "foo", before) ); System.Threading.Thread.Sleep(15); --- 27,31 ---- // cache something ! Assert.IsTrue( ccs.Put("foo", "foo", before) ); System.Threading.Thread.Sleep(15); *************** *** 33,39 **** long after = Timestamper.Next(); ! Assertion.AssertNull( ccs.Get("foo", longBefore) ); ! Assertion.AssertEquals( "foo", ccs.Get("foo", after) ); ! Assertion.Assert( !ccs.Put("foo", "foo", before) ); // update it; --- 33,39 ---- long after = Timestamper.Next(); ! Assert.IsNull( ccs.Get("foo", longBefore) ); ! Assert.AreEqual( "foo", ccs.Get("foo", after) ); ! Assert.IsFalse( ccs.Put("foo", "foo", before) ); // update it; *************** *** 41,47 **** ccs.Lock("foo"); ! Assertion.AssertNull( ccs.Get("foo", after) ); ! Assertion.AssertNull( ccs.Get("foo", longBefore) ); ! Assertion.Assert( !ccs.Put("foo", "foo", before) ); System.Threading.Thread.Sleep(15); --- 41,47 ---- ccs.Lock("foo"); ! Assert.IsNull( ccs.Get("foo", after) ); ! Assert.IsNull( ccs.Get("foo", longBefore) ); ! Assert.IsFalse( ccs.Put("foo", "foo", before) ); System.Threading.Thread.Sleep(15); *************** *** 49,53 **** long whileLocked = Timestamper.Next(); ! Assertion.Assert( !ccs.Put("foo", "foo", whileLocked) ); System.Threading.Thread.Sleep(15); --- 49,53 ---- long whileLocked = Timestamper.Next(); ! Assert.IsFalse( ccs.Put("foo", "foo", whileLocked) ); System.Threading.Thread.Sleep(15); *************** *** 55,62 **** ccs.Release("foo"); ! Assertion.AssertNull( ccs.Get("foo", after) ); ! Assertion.AssertNull( ccs.Get("foo", longBefore) ); ! Assertion.Assert( !ccs.Put("foo", "bar", whileLocked) ); ! Assertion.Assert( !ccs.Put("foo", "bar", after) ); System.Threading.Thread.Sleep(15); --- 55,62 ---- ccs.Release("foo"); ! Assert.IsNull( ccs.Get("foo", after) ); ! Assert.IsNull( ccs.Get("foo", longBefore) ); ! Assert.IsFalse( ccs.Put("foo", "bar", whileLocked) ); ! Assert.IsFalse( ccs.Put("foo", "bar", after) ); System.Threading.Thread.Sleep(15); *************** *** 64,70 **** long longAfter = Timestamper.Next(); ! Assertion.Assert( ccs.Put("foo", "baz", longAfter) ); ! Assertion.AssertNull( ccs.Get("foo", after) ); ! Assertion.AssertNull( ccs.Get("foo", whileLocked) ); System.Threading.Thread.Sleep(15); --- 64,70 ---- long longAfter = Timestamper.Next(); ! Assert.IsTrue( ccs.Put("foo", "baz", longAfter) ); ! Assert.IsNull( ccs.Get("foo", after) ); ! Assert.IsNull( ccs.Get("foo", whileLocked) ); System.Threading.Thread.Sleep(15); *************** *** 72,76 **** long longLongAfter = Timestamper.Next(); ! Assertion.AssertEquals("baz", ccs.Get("foo", longLongAfter) ); // update it again, with multiple locks --- 72,76 ---- long longLongAfter = Timestamper.Next(); ! Assert.AreEqual("baz", ccs.Get("foo", longLongAfter) ); // update it again, with multiple locks *************** *** 79,83 **** ccs.Lock("foo"); ! Assertion.AssertNull( ccs.Get("foo", longLongAfter) ); System.Threading.Thread.Sleep(15); --- 79,83 ---- ccs.Lock("foo"); ! Assert.IsNull( ccs.Get("foo", longLongAfter) ); System.Threading.Thread.Sleep(15); *************** *** 85,89 **** whileLocked = Timestamper.Next(); ! Assertion.Assert( !ccs.Put("foo", "foo", whileLocked) ); System.Threading.Thread.Sleep(15); --- 85,89 ---- whileLocked = Timestamper.Next(); ! Assert.IsFalse( ccs.Put("foo", "foo", whileLocked) ); System.Threading.Thread.Sleep(15); *************** *** 95,100 **** long betweenReleases = Timestamper.Next(); ! Assertion.Assert( !ccs.Put("foo", "bar", betweenReleases) ); ! Assertion.AssertNull( ccs.Get("foo", betweenReleases) ); System.Threading.Thread.Sleep(15); --- 95,100 ---- long betweenReleases = Timestamper.Next(); ! Assert.IsFalse( ccs.Put("foo", "bar", betweenReleases) ); ! Assert.IsNull( ccs.Get("foo", betweenReleases) ); System.Threading.Thread.Sleep(15); *************** *** 102,106 **** ccs.Release("foo"); ! Assertion.Assert( !ccs.Put("foo", "bar", whileLocked) ); System.Threading.Thread.Sleep(15); --- 102,106 ---- ccs.Release("foo"); ! Assert.IsFalse( ccs.Put("foo", "bar", whileLocked) ); System.Threading.Thread.Sleep(15); *************** *** 108,113 **** longAfter = Timestamper.Next(); ! Assertion.Assert( ccs.Put("foo", "baz", longAfter) ); ! Assertion.AssertNull( ccs.Get("foo", whileLocked) ); System.Threading.Thread.Sleep(15); --- 108,113 ---- longAfter = Timestamper.Next(); ! Assert.IsTrue( ccs.Put("foo", "baz", longAfter) ); ! Assert.IsNull( ccs.Get("foo", whileLocked) ); System.Threading.Thread.Sleep(15); *************** *** 115,119 **** longLongAfter = Timestamper.Next(); ! Assertion.AssertEquals("baz", ccs.Get("foo", longLongAfter) ); } --- 115,119 ---- longLongAfter = Timestamper.Next(); ! Assert.AreEqual("baz", ccs.Get("foo", longLongAfter) ); } |