public void Success_NoNewChangesFromOthersAndUs() { // Setup TestEnvironment.CopyFwProjectTo(TestLangProj, _lDSettings.WebWorkDirectory); TestEnvironment.CopyFwProjectTo(TestLangProj, _env.Settings.WebWorkDirectory); LanguageDepotMock.Server.Start(); var ldDirectory = Path.Combine(_lDSettings.WebWorkDirectory, TestLangProj); var oldHashOfLd = MercurialTestHelper.GetRevisionOfTip(ldDirectory); // Execute _synchronizeAction.Run(_lfProject); // Verify Assert.That(MercurialTestHelper.GetRevisionOfTip(ldDirectory), Is.EqualTo(oldHashOfLd)); Assert.That(MercurialTestHelper.GetRevisionOfWorkingSet(_lfProject.ProjectDir), Is.EqualTo(oldHashOfLd)); Assert.That(_env.Logger.GetErrors(), Is.Null.Or.Empty); Assert.That(_env.Logger.GetMessages(), Does.Contain("No changes from others")); Assert.That(_lfProject.State.SRState, Is.EqualTo(ProcessingState.SendReceiveStates.SYNCING)); }
public void Success_ChangesFromOthersNoChangesFromUs() { // Setup var ldDirectory = CopyModifiedProjectAsTestLangProj(_lDSettings.WebWorkDirectory); TestEnvironment.CopyFwProjectTo(TestLangProj, _env.Settings.WebWorkDirectory); LanguageDepotMock.Server.Start(); var oldHashOfLd = MercurialTestHelper.GetRevisionOfTip(ldDirectory); // Execute _synchronizeAction.Run(_lfProject); // Verify Assert.That(MercurialTestHelper.GetRevisionOfWorkingSet(_lfProject.ProjectDir), Is.EqualTo(MercurialTestHelper.GetRevisionOfTip(ldDirectory)), "Our repo doesn't have the changes from LanguageDepot"); Assert.That(MercurialTestHelper.GetRevisionOfTip(ldDirectory), Is.EqualTo(oldHashOfLd)); Assert.That(_env.Logger.GetErrors(), Is.Null.Or.Empty); Assert.That(_env.Logger.GetMessages(), Does.Contain("Received changes from others")); Assert.That(_lfProject.State.SRState, Is.EqualTo(ProcessingState.SendReceiveStates.SYNCING)); }
public void Success_NewBranchFormat_LfMerge68() { // Setup var ldDirectory = CopyModifiedProjectAsTestLangProj(_lDSettings.WebWorkDirectory); TestEnvironment.CopyFwProjectTo(TestLangProj, _env.Settings.WebWorkDirectory); TestEnvironment.WriteTextFile(Path.Combine(_env.Settings.WebWorkDirectory, TestLangProj, "FLExProject.ModelVersion"), "{\"modelversion\": 7000068}"); LanguageDepotMock.Server.Start(); var oldHashOfLd = MercurialTestHelper.GetRevisionOfTip(ldDirectory); // Execute _synchronizeAction.Run(_lfProject); // Verify Assert.That(MercurialTestHelper.GetRevisionOfWorkingSet(_lfProject.ProjectDir), Is.EqualTo(MercurialTestHelper.GetRevisionOfTip(ldDirectory)), "Our repo doesn't have the changes from LanguageDepot"); Assert.That(MercurialTestHelper.GetRevisionOfTip(ldDirectory), Is.EqualTo(oldHashOfLd)); Assert.That(_env.Logger.GetErrors(), Is.Null.Or.Empty); Assert.That(_env.Logger.GetMessages(), Does.Contain("Received changes from others")); }
public void Success_ChangesFromUsNoChangesFromOthers() { // Setup CopyModifiedProjectAsTestLangProj(_env.Settings.WebWorkDirectory); TestEnvironment.CopyFwProjectTo(TestLangProj, _lDSettings.WebWorkDirectory); LanguageDepotMock.Server.Start(); var oldHashOfUs = MercurialTestHelper.GetRevisionOfWorkingSet(_lfProject.ProjectDir); // Execute _synchronizeAction.Run(_lfProject); // Verify Assert.That(MercurialTestHelper.GetRevisionOfWorkingSet(_lfProject.ProjectDir), Is.EqualTo(oldHashOfUs)); Assert.That(MercurialTestHelper.GetRevisionOfTip( Path.Combine(_lDSettings.WebWorkDirectory, TestLangProj)), Is.EqualTo(oldHashOfUs), "LanguageDepot doesn't have our changes"); Assert.That(_env.Logger.GetErrors(), Is.Null.Or.Empty); Assert.That(_env.Logger.GetMessages(), Is.StringContaining("No changes from others")); Assert.That(_lfProject.State.SRState, Is.EqualTo(ProcessingState.SendReceiveStates.SYNCING)); }