public void BackupNow_ExistingRepository_AddsNewFileToBackupDir() { // Test causes a crash in WrapShellCall.exe - is there an updated version? using (var scenario = new BackupScenario("BackupNow_ExistingRepository_AddsNewFileToBackupDir")) { scenario.BackupNow(); scenario.MakeTestLiftFile("blah.lift"); scenario.BackupNow(); scenario.AssertFileExistsInWorkingDirectory("blah.lift"); scenario.AssertFileExistsInRepo("blah.lift"); } }
public void BackupNow_RemoveFile_RemovedFromBackupDir() { // Test causes a crash in WrapShellCall.exe - is there an updated version? using (var scenario = new BackupScenario("BackupNow_RemoveFile_RemovedFromBackupDir")) { scenario.MakeTestLiftFile("blah.lift"); scenario.BackupNow(); File.Delete(Path.Combine(scenario.SourceProjectDir, "blah.lift")); scenario.BackupNow(); scenario.AssertFileDoesNotExistInWorkingDirectory("blah.lift"); } }
public void BackupNow_ExistingRepository_AddsInvalidNewFileToBackupDir() { // Test causes a crash in WrapShellCall.exe - is there an updated version? using (var scenario = new BackupScenario("BackupNow_ExistingRepository_AddsInvalidNewFileToBackupDir")) { scenario.BackupNow(); File.Create(Path.Combine(scenario.SourceProjectDir, "blah.lift")).Close(); scenario.BackupNow(); scenario.AssertFileDoesNotExistInWorkingDirectory("blah.lift"); scenario.AssertFileDoesNotExistInRepo("blah.lift"); } }
public void BackupNow_FirstTime_CreatesValidRepositoryAndWorkingTree() { using (BackupScenario scenario = new BackupScenario("BackupNow_NewFolder_CreatesNewRepository")) { scenario.BackupNow(); scenario.AssertDirExistsInWorkingDirectory(".hg"); scenario.AssertFileExistsInRepo("test.lift"); scenario.AssertFileExistsInRepo("test.WeSayConfig"); scenario.AssertFileExistsInRepo("WritingSystemPrefs.xml"); scenario.AssertFileExistsInWorkingDirectory("test.lift"); scenario.AssertFileExistsInWorkingDirectory("test.WeSayConfig"); scenario.AssertFileExistsInWorkingDirectory("WritingSystemPrefs.xml"); } }
public void BackupNow_FirstTime_CreatesValidRepositoryAndWorkingTree() { using (var scenario = new BackupScenario("BackupNow_NewFolder_CreatesNewRepository")) { scenario.BackupNow(); scenario.AssertDirExistsInWorkingDirectory(".hg"); scenario.AssertFileExistsInRepo("Test.lift"); scenario.AssertFileExistsInRepo("Test.WeSayConfig"); scenario.AssertFileExistsInRepo(Path.Combine("WritingSystems", "qaa-x-qaa.ldml")); scenario.AssertFileExistsInRepo(Path.Combine("WritingSystems", "en.ldml")); scenario.AssertFileExistsInWorkingDirectory("Test.lift"); scenario.AssertFileExistsInWorkingDirectory("Test.WeSayConfig"); scenario.AssertFileExistsInWorkingDirectory(Path.Combine("WritingSystems", "qaa-x-qaa.ldml")); scenario.AssertFileExistsInWorkingDirectory(Path.Combine("WritingSystems", "en.ldml")); } }
public void BackupNow_ExistingRepository_AddsNewFileToBackupDir() { // Test causes a crash in WrapShellCall.exe - is there an updated version? using (BackupScenario scenario = new BackupScenario("BackupNow_ExistingRepository_AddsNewFileToBackupDir")) { scenario.BackupNow(); File.Create(Path.Combine(scenario.SourceProjectDir, "blah.foo")).Close(); scenario.BackupNow(); scenario.AssertFileExistsInWorkingDirectory("blah.foo"); scenario.AssertFileExistsInRepo("blah.foo"); } }
public void BackupNow_RemoveFile_RemovedFromBackupDir() { // Test causes a crash in WrapShellCall.exe - is there an updated version? using (BackupScenario scenario = new BackupScenario("BackupNow_RemoveFile_RemovedFromBackupDir")) { File.Create(Path.Combine(scenario.SourceProjectDir, "blah.foo")).Close(); scenario.BackupNow(); File.Delete(Path.Combine(scenario.SourceProjectDir, "blah.foo")); scenario.BackupNow(); scenario.AssertFileDoesNotExistInWorkingDirectory("blah.foo"); } }