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")); }
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")); }
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()); }