Пример #1
0
		public virtual void testEntryObjectId()
		{
			EmptyTreeIterator etp = new EmptyTreeIterator();
			Assert.AreSame(ObjectId.ZeroId, etp.getEntryObjectId());
			Assert.IsNotNull(etp.idBuffer());
			Assert.AreEqual(0, etp.idOffset());
			Assert.AreEqual(ObjectId.ZeroId, ObjectId.FromRaw(etp.idBuffer()));
		}
Пример #2
0
		public virtual void testCreateSubtreeIterator()
		{
			EmptyTreeIterator etp = new EmptyTreeIterator();
			AbstractTreeIterator sub = etp.createSubtreeIterator(db);
			Assert.IsNotNull(sub);
			Assert.IsTrue(sub.first());
			Assert.IsTrue(sub.eof());
			Assert.IsTrue(sub is EmptyTreeIterator);
		}
Пример #3
0
		public virtual void testNextDoesNothing()
		{
			EmptyTreeIterator etp = new EmptyTreeIterator();
			etp.next(1);
			Assert.IsTrue(etp.first());
			Assert.IsTrue(etp.eof());
			Assert.AreEqual(ObjectId.ZeroId, ObjectId.FromRaw(etp.idBuffer()));

			etp.next(1);
			Assert.IsTrue(etp.first());
			Assert.IsTrue(etp.eof());
			Assert.AreEqual(ObjectId.ZeroId, ObjectId.FromRaw(etp.idBuffer()));
		}
Пример #4
0
		public virtual void testAtEOF()
		{
			EmptyTreeIterator etp = new EmptyTreeIterator();
			Assert.IsTrue(etp.first());
			Assert.IsTrue(etp.eof());
		}