示例#1
0
        public virtual void TestCheckoutSecond()
        {
            CheckoutCommand co      = git.Checkout();
            FilePath        written = WriteTrashFile(FILE1, string.Empty);

            co.SetStartPoint("HEAD~1").AddPath(FILE1).Call();
            NUnit.Framework.Assert.AreEqual("2", Read(written));
            NUnit.Framework.Assert.AreEqual("c", Read(new FilePath(db.WorkTree, FILE2)));
        }
示例#2
0
        public virtual void TestCheckoutRepository()
        {
            CheckoutCommand co    = git.Checkout();
            FilePath        test  = WriteTrashFile(FILE1, string.Empty);
            FilePath        test2 = WriteTrashFile(FILE2, string.Empty);

            co.SetStartPoint("HEAD~2").SetAllPaths(true).Call();
            NUnit.Framework.Assert.AreEqual("1", Read(test));
            NUnit.Framework.Assert.AreEqual("a", Read(test2));
        }
示例#3
0
        public virtual void TestCheckoutMultiple()
        {
            CheckoutCommand co    = git.Checkout();
            FilePath        test  = WriteTrashFile(FILE1, string.Empty);
            FilePath        test2 = WriteTrashFile(FILE2, string.Empty);

            co.SetStartPoint("HEAD~2").AddPath(FILE1).AddPath(FILE2).Call();
            NUnit.Framework.Assert.AreEqual("1", Read(test));
            NUnit.Framework.Assert.AreEqual("a", Read(test2));
        }