public void testEmpty_FromString() { AbbreviatedObjectId i = AbbreviatedObjectId.FromString(string.Empty); Assert.IsNotNull(i); Assert.AreEqual(0, i.Length); Assert.IsFalse(i.isComplete()); Assert.AreEqual(string.Empty, i.name()); }
public void test17_FromString() { const string s = "7b6e8067ec96acef9"; AbbreviatedObjectId i = AbbreviatedObjectId.FromString(s); Assert.IsNotNull(i); Assert.AreEqual(s.Length, i.Length); Assert.IsFalse(i.isComplete()); Assert.AreEqual(s, i.name()); Assert.IsNull(i.ToObjectId()); }
public void testFull_FromString() { const string s = "7b6e8067ec96acef9a4184b43210d583b6d2f99a"; AbbreviatedObjectId i = AbbreviatedObjectId.FromString(s); Assert.IsNotNull(i); Assert.AreEqual(s.Length, i.Length); Assert.IsTrue(i.isComplete()); Assert.AreEqual(s, i.name()); ObjectId f = i.ToObjectId(); Assert.IsNotNull(f); Assert.AreEqual(ObjectId.FromString(s), f); Assert.AreEqual(f.GetHashCode(), i.GetHashCode()); }