Пример #1
0
        public void GitFs_WhenStashesCurrentState_RemovesUntrackedFiles()
        {
            var testPath = Path.Combine(Utils.GetProjectRootDirectory(), Constants.VanillaTestData, "aaa");

            try
            {
                File.WriteAllText(testPath, "aaa");
                gitFileService.StashCurrentStateIfDirty(Constants.VanillaEnvironment, false);
                Assert.False(File.Exists(testPath));
            }
            finally
            {
                File.Delete(testPath);
            }
        }
Пример #2
0
 /// <summary>
 /// Typically called if a test fails
 /// stashes the current state of the test environment under a commit hash and logs this.
 /// The user can do commit apply hash to restore the state and
 /// then commit reset --hard -- &lt;testenvironment-root-directory&gt;
 /// </summary>
 /// <param name="suppressLog"></param>
 public void Terminate(bool suppressLog)
 {
     fileService.StashCurrentStateIfDirty(environment, suppressLog);
 }