Skip to content
This repository was archived by the owner on Jun 27, 2019. It is now read-only.

Commit 542b854

Browse files
committed
Use Path.Combine() instead of string concatenation
1 parent 73a44f6 commit 542b854

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/GitTools.Core.Tests/Git/GitRepositoryFactoryTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public void WorksCorrectlyWithRemoteRepository(string branchName, string expecte
5252
dynamicRepositoryPath = gitRepository.DotGitDirectory;
5353

5454
gitRepository.IsDynamic.ShouldBe(true);
55-
gitRepository.DotGitDirectory.ShouldBe(expectedDynamicRepoLocation + Path.DirectorySeparatorChar + ".git");
55+
gitRepository.DotGitDirectory.ShouldBe(Path.Combine(expectedDynamicRepoLocation, ".git"));
5656

5757
var currentBranch = gitRepository.Repository.Head.CanonicalName;
5858

@@ -145,7 +145,7 @@ public void PicksAnotherDirectoryNameWhenDynamicRepoFolderTaken()
145145
using (var gitRepository = GitRepositoryFactory.CreateRepository(repositoryInfo))
146146
{
147147
gitRepository.IsDynamic.ShouldBe(true);
148-
gitRepository.DotGitDirectory.ShouldBe(expectedDynamicRepoLocation + "_1" + Path.DirectorySeparatorChar + ".git");
148+
gitRepository.DotGitDirectory.ShouldBe(Path.Combine(expectedDynamicRepoLocation + "_1", ".git"));
149149
}
150150
}
151151
}

0 commit comments

Comments
 (0)