Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit a992d2c

Browse files
committed
Fix some tests
1 parent 4cd00a6 commit a992d2c

File tree

2 files changed

+52
-6
lines changed

2 files changed

+52
-6
lines changed

src/tests/IntegrationTests/Process/ProcessManagerIntegrationTests.cs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,9 @@ public async Task LogEntriesTest()
4646
new GitLogEntry("018997938335742f8be694240a7c2b352ec0835f",
4747
"Author Person", "author@example.com", "Author Person",
4848
"author@example.com",
49-
"Moving project files where they should be kept",
50-
"Moving project files where they should be kept", firstCommitTime,
49+
"Moving project files where they should be kept",
50+
"",
51+
firstCommitTime,
5152
firstCommitTime, new List<GitStatusEntry>
5253
{
5354
new GitStatusEntry("Assets/TestDocument.txt".ToNPath(),
@@ -59,7 +60,8 @@ public async Task LogEntriesTest()
5960
"Author Person", "author@example.com", "Author Person",
6061
"author@example.com",
6162
"Initial Commit",
62-
"Initial Commit", secondCommitTime,
63+
"",
64+
secondCommitTime,
6365
secondCommitTime, new List<GitStatusEntry>
6466
{
6567
new GitStatusEntry("TestDocument.txt".ToNPath(),
@@ -87,7 +89,8 @@ public async Task RussianLogEntriesTest()
8789
"Author Person", "author@example.com", "Author Person",
8890
"author@example.com",
8991
"Я люблю github",
90-
"Я люблю github", commitTime,
92+
"",
93+
commitTime,
9194
commitTime, new List<GitStatusEntry>
9295
{
9396
new GitStatusEntry(@"Assets\A new file.txt".ToNPath(),

src/tests/UnitTests/IO/LogEntryOutputProcessorTests.cs

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ public void ShouldParseSingleCommit()
4646
{
4747
new GitLogEntry("1cd4b9154a88bc8c7b09cb8cacc79bf1d5bde8cf",
4848
"Author Person", "author@example.com",
49-
"Author Person", "author@example.com",
50-
"Rename RepositoryModelBase to RepositoryModel",
49+
"Author Person", "author@example.com",
5150
"Rename RepositoryModelBase to RepositoryModel",
51+
"",
5252
commitTime, commitTime,
5353
new List<GitStatusEntry>
5454
{
@@ -61,6 +61,49 @@ public void ShouldParseSingleCommit()
6161
AssertProcessOutput(output, expected);
6262
}
6363

64+
[Test]
65+
public void ShouldParseSummaryAndDescription()
66+
{
67+
var output = new[]
68+
{
69+
"1cd4b9154a88bc8c7b09cb8cacc79bf1d5bde8cf",
70+
"865b8d9d6e5e3bd6d7a4dc9c9f3588192314942c",
71+
"Author Person",
72+
"author@example.com",
73+
"2017-01-06T15:36:57+01:00",
74+
"Author Person",
75+
"author@example.com",
76+
"2017-01-06T15:36:57+01:00",
77+
"Rename RepositoryModelBase to RepositoryModel",
78+
"",
79+
"This is a line on the description",
80+
"---GHUBODYEND---",
81+
"M src/GitHub.App/Models/RemoteRepositoryModel.cs",
82+
null,
83+
};
84+
85+
var commitTime = new DateTimeOffset(2017, 1, 6, 15, 36, 57, TimeSpan.FromHours(1));
86+
87+
var expected = new[]
88+
{
89+
new GitLogEntry("1cd4b9154a88bc8c7b09cb8cacc79bf1d5bde8cf",
90+
"Author Person", "author@example.com",
91+
"Author Person", "author@example.com",
92+
"Rename RepositoryModelBase to RepositoryModel",
93+
"This is a line on the description",
94+
commitTime,
95+
commitTime,
96+
new List<GitStatusEntry>
97+
{
98+
new GitStatusEntry("src/GitHub.App/Models/RemoteRepositoryModel.cs",
99+
TestRootPath + @"\src/GitHub.App/Models/RemoteRepositoryModel.cs", null,
100+
GitFileStatus.Modified),
101+
})
102+
};
103+
104+
AssertProcessOutput(output, expected);
105+
}
106+
64107
private void AssertProcessOutput(IEnumerable<string> lines, GitLogEntry[] expected)
65108
{
66109
var gitObjectFactory = SubstituteFactory.CreateGitObjectFactory(TestRootPath);

0 commit comments

Comments
 (0)