private static void Populate_File_For_Commit(TestCommit commit, Repository repo) { var content = string.Join("\n", commit.Lines); var filePath = Path.Combine(repo.Info.WorkingDirectory, commit.FileName); File.WriteAllText(filePath, content); }
private static void Commit_File(Repository repo, TestCommit commit) { Commands.Stage(repo, "*"); var author = new Signature(commit.Name, commit.Email, commit.TimeStamp); repo.Commit(commit.CommitMessage, author, author); }
public RepositoryTestDataBuilder Make_Commit(TestCommit commit) { _commits.Add(new TestCommitWithBranch { Commit = commit, Branch = _branch }); return(this); }
public TestCommit Build() { var result = new TestCommit { Name = _authorName, Email = _email, FileName = _fileName, Lines = new List <string>(), CommitMessage = _commitMessage, TimeStamp = _commitTimestamp }; result.Lines.AddRange(_fileContents); _fileContents.Clear(); return(result); }