Example #1
0
 public virtual void Test()
 {
     PeekPersistedTestCase.Item root = QueryRoot();
     for (int i = 0; i < 10; i++)
     {
         Peek(root, i);
     }
 }
Example #2
0
		protected override void Store()
		{
			PeekPersistedTestCase.Item root = new PeekPersistedTestCase.Item("1", null);
			PeekPersistedTestCase.Item current = root;
			for (int i = 2; i < 11; i++)
			{
				current.child = new PeekPersistedTestCase.Item(string.Empty + i, null);
				current = current.child;
			}
			Store(root);
		}
Example #3
0
 protected override void Store()
 {
     PeekPersistedTestCase.Item root    = new PeekPersistedTestCase.Item("1", null);
     PeekPersistedTestCase.Item current = root;
     for (int i = 2; i < 11; i++)
     {
         current.child = new PeekPersistedTestCase.Item(string.Empty + i, null);
         current       = current.child;
     }
     Store(root);
 }
Example #4
0
 private void Peek(PeekPersistedTestCase.Item original, int depth)
 {
     PeekPersistedTestCase.Item peeked = (PeekPersistedTestCase.Item)((PeekPersistedTestCase.Item
                                                                       )Db().PeekPersisted(original, depth, true));
     for (int i = 0; i <= depth; i++)
     {
         Assert.IsNotNull(peeked, "Failed to peek at child " + i + " at depth " + depth);
         Assert.IsFalse(Db().IsStored(peeked));
         peeked = peeked.child;
     }
     Assert.IsNull(peeked);
 }
Example #5
0
			public Item(string name, PeekPersistedTestCase.Item child)
			{
				this.name = name;
				this.child = child;
			}
Example #6
0
 public Item(string name, PeekPersistedTestCase.Item child)
 {
     this.name  = name;
     this.child = child;
 }