Ejemplo n.º 1
0
        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());
        }
Ejemplo n.º 2
0
        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());
        }
Ejemplo n.º 3
0
        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());
        }