Пример #1
0
		public void TestSelectNonIdentity()
		{
			if( runTests )
			{
				// populate
				rw1 = new ReservedWords( 0, "order", 2, "of", "group" );
				rw1.Persist();
				// test select
				rw2 = ReservedWords.Retrieve( "group" );
				Assert.IsNotNull( rw2 );
				Assert.AreEqual( rw1.Identity, rw2.Identity );
				Assert.AreEqual( "order", rw2.Order );
				Assert.AreEqual( 2, rw2.Value );
				Assert.AreEqual( "of", rw2.Of );
				Assert.AreEqual( "group", rw2.Group );
			}
		}
Пример #2
0
 public void TestSelectNonIdentity()
 {
     if (runTests)
     {
         // populate
         rw1 = new ReservedWords(0, "order", 2, "of", "group");
         rw1.Persist();
         // test select
         rw2 = ReservedWords.Retrieve("group");
         Assert.IsNotNull(rw2);
         Assert.AreEqual(rw1.Identity, rw2.Identity);
         Assert.AreEqual("order", rw2.Order);
         Assert.AreEqual(2, rw2.Value);
         Assert.AreEqual("of", rw2.Of);
         Assert.AreEqual("group", rw2.Group);
     }
 }
Пример #3
0
		public void TestCRUD()
		{
			if( runTests )
			{
				rw1 = new ReservedWords( 0, "order", 2, "of", "group" );
				// test insert
				rw1.Persist();
				// test select
				rw2 = ReservedWords.Retrieve( rw1.Identity );
				Assert.IsNotNull( rw2 );
				Assert.AreEqual( rw1.Identity, rw2.Identity );
				Assert.AreEqual( "order", rw2.Order );
				Assert.AreEqual( 2, rw2.Value );
				Assert.AreEqual( "of", rw2.Of );
				Assert.AreEqual( "group", rw2.Group );
				// test update
				rw1.Of = "hello";
				rw1.Persist();
				rw2 = ReservedWords.Retrieve( rw1.Identity );
				Assert.AreEqual( rw1.Of, rw2.Of );
				// cleanup
				rw2.Remove();
			}
		}
Пример #4
0
 public void TestCRUD()
 {
     if (runTests)
     {
         rw1 = new ReservedWords(0, "order", 2, "of", "group");
         // test insert
         rw1.Persist();
         // test select
         rw2 = ReservedWords.Retrieve(rw1.Identity);
         Assert.IsNotNull(rw2);
         Assert.AreEqual(rw1.Identity, rw2.Identity);
         Assert.AreEqual("order", rw2.Order);
         Assert.AreEqual(2, rw2.Value);
         Assert.AreEqual("of", rw2.Of);
         Assert.AreEqual("group", rw2.Group);
         // test update
         rw1.Of = "hello";
         rw1.Persist();
         rw2 = ReservedWords.Retrieve(rw1.Identity);
         Assert.AreEqual(rw1.Of, rw2.Of);
         // cleanup
         rw2.Remove();
     }
 }