public void ShouldNotImportDuplicateCommits() { var repo = new GitTestRepositoryWithCherryPickedCommit(); var transportMock = ObjectFactory.GetInstance <TransportMock>(); var gitPluginProfile = new GitPluginProfile { Uri = repo.Uri.ToString(), Login = repo.Login, Password = repo.Password, StartRevision = "1/1/1980" }; var profile = transportMock.AddProfile("CherryPick", gitPluginProfile); using (var git = CreateGit(gitPluginProfile)) { var startRevisionId = CreateGitRevisionId(GitRevisionId.UtcTimeMin); var revisionRange = git.GetFromTillHead(startRevisionId, 100).Single(); transportMock.HandleLocalMessage(profile, new NewRevisionRangeDetectedLocalMessage { Range = revisionRange }); transportMock.TpQueue.GetMessages <CreateCommand>().Count(x => x.Dto is RevisionDTO).Should(Be.EqualTo(1)); } }
public void Init() { _profile = new GitPluginProfile() { Uri = "http://localhost", StartRevision = "1/1/1980" }; _errors = new PluginProfileErrorCollection(); }
public void Init() { _profile = new GitPluginProfile(){Uri = "http://localhost", StartRevision = "1/1/1980"}; _errors = new PluginProfileErrorCollection(); }
public void ShouldNotImportDuplicateCommits() { var repo = new GitTestRepositoryWithCherryPickedCommit(); var transportMock = ObjectFactory.GetInstance<TransportMock>(); var gitPluginProfile = new GitPluginProfile { Uri = repo.Uri.ToString(), Login = repo.Login, Password = repo.Password, StartRevision = "1/1/1980" }; var profile = transportMock.AddProfile("CherryPick", gitPluginProfile); using (var git = CreateGit(gitPluginProfile)) { var startRevisionId = CreateGitRevisionId(GitRevisionId.UtcTimeMin); var revisionRange = git.GetFromTillHead(startRevisionId, 100).Single(); transportMock.HandleLocalMessage(profile, new NewRevisionRangeDetectedLocalMessage {Range = revisionRange}); transportMock.TpQueue.GetMessages<CreateCommand>().Count(x => x.Dto is RevisionDTO).Should(Be.EqualTo(1), "transportMock.TpQueue.GetMessages<CreateCommand>().Count(x => x.Dto is RevisionDTO).Should(Be.EqualTo(1))"); } }