示例#1
0
        public virtual void TestSetDestination()
        {
            RefSpec a = new RefSpec();
            RefSpec b = a.SetDestination("refs/heads/master");

            NUnit.Framework.Assert.AreNotSame(a, b);
            NUnit.Framework.Assert.AreEqual("HEAD", a.ToString());
            NUnit.Framework.Assert.AreEqual("HEAD:refs/heads/master", b.ToString());
        }
示例#2
0
		public virtual void TestSetDestination_SourceNull()
		{
			RefSpec a = new RefSpec();
			RefSpec b;
			b = a.SetDestination("refs/heads/master");
			b = b.SetSource(null);
			NUnit.Framework.Assert.AreNotSame(a, b);
			NUnit.Framework.Assert.AreEqual("HEAD", a.ToString());
			NUnit.Framework.Assert.AreEqual(":refs/heads/master", b.ToString());
		}