public void testToString_NoPrefix() { global::GitSharp.Core.Ref a = newRef("refs/heads/A", ID_ONE); global::GitSharp.Core.Ref b = newRef("refs/heads/B", ID_TWO); packed = toList(a, b); StringBuilder exp = new StringBuilder(); exp.Append("["); exp.Append(a.ToString()); exp.Append(", "); exp.Append(b.ToString()); exp.Append("]"); RefMap map = new RefMap("", packed, loose, resolved); Assert.AreEqual(exp.ToString(), map.ToString()); }
public void testToString_WithPrefix() { global::GitSharp.Core.Ref a = newRef("refs/heads/A", ID_ONE); global::GitSharp.Core.Ref b = newRef("refs/heads/foo/B", ID_TWO); global::GitSharp.Core.Ref c = newRef("refs/heads/foo/C", ID_TWO); global::GitSharp.Core.Ref g = newRef("refs/heads/g", ID_ONE); packed = toList(a, b, c, g); StringBuilder exp = new StringBuilder(); exp.Append("["); exp.Append(b.ToString()); exp.Append(", "); exp.Append(c.ToString()); exp.Append("]"); RefMap map = new RefMap("refs/heads/foo/", packed, loose, resolved); Assert.AreEqual(exp.ToString(), map.ToString()); }
public virtual void TestToString_WithPrefix() { Ref a = NewRef("refs/heads/A", ID_ONE); Ref b = NewRef("refs/heads/foo/B", ID_TWO); Ref c = NewRef("refs/heads/foo/C", ID_TWO); Ref g = NewRef("refs/heads/g", ID_ONE); packed = ToList(a, b, c, g); StringBuilder exp = new StringBuilder(); exp.Append("["); exp.Append(b.ToString()); exp.Append(", "); exp.Append(c.ToString()); exp.Append("]"); RefMap map = new RefMap("refs/heads/foo/", packed, loose, resolved); NUnit.Framework.Assert.AreEqual(exp.ToString(), map.ToString()); }
public virtual void TestToString_NoPrefix() { Ref a = NewRef("refs/heads/A", ID_ONE); Ref b = NewRef("refs/heads/B", ID_TWO); packed = ToList(a, b); StringBuilder exp = new StringBuilder(); exp.Append("["); exp.Append(a.ToString()); exp.Append(", "); exp.Append(b.ToString()); exp.Append("]"); RefMap map = new RefMap(string.Empty, packed, loose, resolved); NUnit.Framework.Assert.AreEqual(exp.ToString(), map.ToString()); }