398
398
/// <exception cref="System.Exception"></exception>
399
399
[NUnit.Framework.Test]
400
public virtual void StashChangeInANewSubdirectory()
402
string subdir = "subdir";
403
string fname = "file2.txt";
404
string path = subdir + "/" + fname;
405
string otherBranch = "otherbranch";
406
WriteTrashFile(subdir, fname, "content2");
407
git.Add().AddFilepattern(path).Call();
408
RevCommit stashed = git.StashCreate().Call();
409
NUnit.Framework.Assert.IsNotNull(stashed);
410
NUnit.Framework.Assert.IsTrue(git.Status().Call().IsClean());
411
git.BranchCreate().SetName(otherBranch).Call();
412
git.Checkout().SetName(otherBranch).Call();
413
ObjectId unstashed = git.StashApply().Call();
414
NUnit.Framework.Assert.AreEqual(stashed, unstashed);
415
Status status = git.Status().Call();
416
NUnit.Framework.Assert.IsTrue(status.GetChanged().IsEmpty());
417
NUnit.Framework.Assert.IsTrue(status.GetConflicting().IsEmpty());
418
NUnit.Framework.Assert.IsTrue(status.GetMissing().IsEmpty());
419
NUnit.Framework.Assert.IsTrue(status.GetRemoved().IsEmpty());
420
NUnit.Framework.Assert.IsTrue(status.GetModified().IsEmpty());
421
NUnit.Framework.Assert.IsTrue(status.GetUntracked().IsEmpty());
422
NUnit.Framework.Assert.AreEqual(1, status.GetAdded().Count);
423
NUnit.Framework.Assert.IsTrue(status.GetAdded().Contains(path));
426
/// <exception cref="System.Exception"></exception>
427
[NUnit.Framework.Test]
400
428
public virtual void UnstashNonStashCommit()