SetDestination() public method

public SetDestination ( string destination ) : RefSpec
destination string
return RefSpec
示例#1
0
        public void testSetDestination_SourceNull()
        {
            RefSpec a = new RefSpec();
            RefSpec b;

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