コード例 #1
0
ファイル: RefMapTest.cs プロジェクト: dev218/GitSharp
        public void testEmpty_NoPrefix1()
        {
            RefMap map = new RefMap("", packed, loose, resolved);
            Assert.IsTrue(map.isEmpty()); // before size was computed
            Assert.AreEqual(0, map.size());
            Assert.IsTrue(map.isEmpty()); // after size was computed

            Assert.IsFalse(map.entrySet().iterator().hasNext());
            Assert.IsFalse(map.keySet().iterator().hasNext());
            Assert.IsFalse(map.containsKey("a"));
            Assert.IsNull(map.get("a"));
        }
コード例 #2
0
ファイル: RefMapTest.cs プロジェクト: zzia615/GitSharp
        public void testEmpty_NoPrefix2()
        {
            RefMap map = new RefMap();

            Assert.IsTrue(map.isEmpty()); // before size was computed
            Assert.AreEqual(0, map.size());
            Assert.IsTrue(map.isEmpty()); // after size was computed

            Assert.IsFalse(map.entrySet().iterator().hasNext());
            Assert.IsFalse(map.keySet().iterator().hasNext());
            Assert.IsFalse(map.containsKey("a"));
            Assert.IsNull(map.get("a"));
        }
コード例 #3
0
ファイル: RefMapTest.cs プロジェクト: zzia615/GitSharp
        public void testEmpty_WithPrefix()
        {
            global::GitSharp.Core.Ref master = newRef("refs/heads/master", ID_ONE);
            packed = toList(master);

            RefMap map = new RefMap("refs/tags/", packed, loose, resolved);

            Assert.IsTrue(map.isEmpty()); // before size was computed
            Assert.AreEqual(0, map.size());
            Assert.IsTrue(map.isEmpty()); // after size was computed

            Assert.IsFalse(map.entrySet().iterator().hasNext());
            Assert.IsFalse(map.keySet().iterator().hasNext());
        }
コード例 #4
0
ファイル: RefMapTest.cs プロジェクト: deodelacruz/GitSharp
        public void testEmpty_WithPrefix()
        {
            global::GitSharp.Core.Ref master = newRef("refs/heads/master", ID_ONE);
            packed = toList(master);

            RefMap map = new RefMap("refs/tags/", packed, loose, resolved);
            Assert.IsTrue(map.isEmpty()); // before size was computed
            Assert.AreEqual(0, map.size());
            Assert.IsTrue(map.isEmpty()); // after size was computed

            Assert.IsFalse(map.entrySet().iterator().hasNext());
            Assert.IsFalse(map.keySet().iterator().hasNext());
        }