예제 #1
0
 public virtual void Test001_createEmpty()
 {
     Tree t = new Tree(db);
     NUnit.Framework.Assert.IsTrue(t.IsLoaded(), "isLoaded");
     NUnit.Framework.Assert.IsTrue(t.IsModified(), "isModified");
     NUnit.Framework.Assert.IsTrue(t.GetParent() == null, "no parent");
     NUnit.Framework.Assert.IsTrue(t.IsRoot(), "isRoot");
     NUnit.Framework.Assert.IsTrue(t.GetName() == null, "no name");
     NUnit.Framework.Assert.IsTrue(t.GetNameUTF8() == null, "no nameUTF8");
     NUnit.Framework.Assert.IsTrue(t.Members() != null, "has entries array");
     NUnit.Framework.Assert.IsTrue(t.Members().Length == 0, "entries is empty");
     NUnit.Framework.Assert.AreEqual(string.Empty, t.GetFullName(), "full name is empty"
         );
     NUnit.Framework.Assert.IsTrue(t.GetId() == null, "no id");
     NUnit.Framework.Assert.IsTrue(t.GetTree() == t, "tree is self");
     NUnit.Framework.Assert.IsTrue(t.GetRepository() == db, "database is r");
     NUnit.Framework.Assert.IsTrue(t.FindTreeMember("foo") == null, "no foo child");
     NUnit.Framework.Assert.IsTrue(t.FindBlobMember("foo") == null, "no foo child");
 }