public virtual void TestAtEOF()
        {
            EmptyTreeIterator etp = new EmptyTreeIterator();

            NUnit.Framework.Assert.IsTrue(etp.First);
            NUnit.Framework.Assert.IsTrue(etp.Eof);
        }
Пример #2
0
		public virtual void TestEntryObjectId()
		{
			EmptyTreeIterator etp = new EmptyTreeIterator();
			NUnit.Framework.Assert.AreSame(ObjectId.ZeroId, etp.EntryObjectId);
			NUnit.Framework.Assert.IsNotNull(etp.IdBuffer);
			NUnit.Framework.Assert.AreEqual(0, etp.IdOffset);
			NUnit.Framework.Assert.AreEqual(ObjectId.ZeroId, ObjectId.FromRaw(etp.IdBuffer));
		}
        public virtual void TestEntryObjectId()
        {
            EmptyTreeIterator etp = new EmptyTreeIterator();

            NUnit.Framework.Assert.AreSame(ObjectId.ZeroId, etp.EntryObjectId);
            NUnit.Framework.Assert.IsNotNull(etp.IdBuffer);
            NUnit.Framework.Assert.AreEqual(0, etp.IdOffset);
            NUnit.Framework.Assert.AreEqual(ObjectId.ZeroId, ObjectId.FromRaw(etp.IdBuffer));
        }
Пример #4
0
        public virtual void TestCreateEmptyTreeIterator()
        {
            AbstractTreeIteratorTest.FakeTreeIterator i = new AbstractTreeIteratorTest.FakeTreeIterator
                                                              (this, "a/b/cd", FileMode.TREE);
            EmptyTreeIterator e = i.CreateEmptyTreeIterator();

            NUnit.Framework.Assert.IsNotNull(e);
            NUnit.Framework.Assert.AreEqual(i.EntryPathString + "/", e.EntryPathString);
        }
Пример #5
0
		public virtual void TestCreateSubtreeIterator()
		{
			EmptyTreeIterator etp = new EmptyTreeIterator();
			ObjectReader reader = db.NewObjectReader();
			AbstractTreeIterator sub = etp.CreateSubtreeIterator(reader);
			NUnit.Framework.Assert.IsNotNull(sub);
			NUnit.Framework.Assert.IsTrue(sub.First);
			NUnit.Framework.Assert.IsTrue(sub.Eof);
			NUnit.Framework.Assert.IsTrue(sub is EmptyTreeIterator);
		}
        public virtual void TestCreateSubtreeIterator()
        {
            EmptyTreeIterator    etp    = new EmptyTreeIterator();
            ObjectReader         reader = db.NewObjectReader();
            AbstractTreeIterator sub    = etp.CreateSubtreeIterator(reader);

            NUnit.Framework.Assert.IsNotNull(sub);
            NUnit.Framework.Assert.IsTrue(sub.First);
            NUnit.Framework.Assert.IsTrue(sub.Eof);
            NUnit.Framework.Assert.IsTrue(sub is EmptyTreeIterator);
        }
        public virtual void TestNextDoesNothing()
        {
            EmptyTreeIterator etp = new EmptyTreeIterator();

            etp.Next(1);
            NUnit.Framework.Assert.IsTrue(etp.First);
            NUnit.Framework.Assert.IsTrue(etp.Eof);
            NUnit.Framework.Assert.AreEqual(ObjectId.ZeroId, ObjectId.FromRaw(etp.IdBuffer));
            etp.Next(1);
            NUnit.Framework.Assert.IsTrue(etp.First);
            NUnit.Framework.Assert.IsTrue(etp.Eof);
            NUnit.Framework.Assert.AreEqual(ObjectId.ZeroId, ObjectId.FromRaw(etp.IdBuffer));
        }
Пример #8
0
		public virtual void TestNextDoesNothing()
		{
			EmptyTreeIterator etp = new EmptyTreeIterator();
			etp.Next(1);
			NUnit.Framework.Assert.IsTrue(etp.First);
			NUnit.Framework.Assert.IsTrue(etp.Eof);
			NUnit.Framework.Assert.AreEqual(ObjectId.ZeroId, ObjectId.FromRaw(etp.IdBuffer));
			etp.Next(1);
			NUnit.Framework.Assert.IsTrue(etp.First);
			NUnit.Framework.Assert.IsTrue(etp.Eof);
			NUnit.Framework.Assert.AreEqual(ObjectId.ZeroId, ObjectId.FromRaw(etp.IdBuffer));
		}
Пример #9
0
		public virtual void TestAtEOF()
		{
			EmptyTreeIterator etp = new EmptyTreeIterator();
			NUnit.Framework.Assert.IsTrue(etp.First);
			NUnit.Framework.Assert.IsTrue(etp.Eof);
		}