10000 Minor test code cleanup · GiTechLab/libgit2sharp@fc59d2e · GitHub
[go: up one dir, main page]

Skip to content

Commit fc59d2e

Browse files
committed
Minor test code cleanup
1 parent ca7b9be commit fc59d2e

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

LibGit2Sharp.Tests/BranchFixture.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -443,8 +443,8 @@ public void QueryAmbigousRemoteForRemoteBranch()
443443
{
444444
var path = SandboxStandardTestRepo();
445445

446-
var fetchRefSpec = "+refs/heads/*:refs/remotes/origin/*";
447-
var url = "http://github.com/libgit2/TestGitRepository";
446+
const string fetchRefSpec = "+refs/heads/*:refs/remotes/origin/*";
447+
const string url = "http://github.com/libgit2/TestGitRepository";
448448

449449
using (var repo = InitIsolatedRepository(path))
450450
{

LibGit2Sharp.Tests/CheckoutFixture.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ namespace LibGit2Sharp.Tests
99
{
1010
public class CheckoutFixture : BaseFixture
1111
{
12-
private static readonly string originalFilePath = "a.txt";
13-
private static readonly string originalFileContent = "Hello";
14-
private static readonly string alternateFileContent = "There again";
15-
private static readonly string otherBranchName = "other";
12+
private const string originalFilePath = "a.txt";
13+
private const string originalFileContent = "Hello";
14+
private const string alternateFileContent = "There again";
15+
private const string otherBranchName = "other";
1616

1717
[Theory]
1818
[InlineData("i-do-numbers")]
@@ -319,7 +319,7 @@ public void CanCancelCheckoutThroughNotifyCallback()
319319

320320
using (var repo = new Repository(repoPath))
321321
{
322-
string relativePath = "a.txt";
322+
const string relativePath = "a.txt";
323323
Touch(repo.Info.WorkingDirectory, relativePath, "Hello\n");
324324

325325
repo.Stage(relativePath);
@@ -451,13 +451,13 @@ public void CheckingOutCallsCheckoutNotify(CheckoutNotifyFlags notifyFlags, stri
451451
{
452452
PopulateBasicRepository(repo);
453453

454-
string relativePathUpdated = "updated.txt";
454+
const string relativePathUpdated = "updated.txt";
455455
Touch(repo.Info.WorkingDirectory, relativePathUpdated, "updated file text A");
456456
repo.Stage(relativePathUpdated);
457457
repo.Commit("Commit initial update file", Constants.Signature, Constants.Signature);
458458

459459
// Create conflicting change
460-
string relativePathConflict = "conflict.txt";
460+
const string relativePathConflict = "conflict.txt";
461461
Touch(repo.Info.WorkingDirectory, relativePathConflict, "conflict file text A");
462462
repo.Stage(relativePathConflict);
463463
repo.Commit("Initial commit of conflict.txt and update.txt", Constants.Signature, Constants.Signature);
@@ -492,7 +492,7 @@ public void CheckingOutCallsCheckoutNotify(CheckoutNotifyFlags notifyFlags, stri
492492
Touch(repo.Info.WorkingDirectory, relativePathIgnore, "ignored file");
493493

494494
// Create untracked change
495-
string relativePathUntracked = "untracked.txt";
495+
const string relativePathUntracked = "untracked.txt";
496496
Touch(repo.Info.WorkingDirectory, relativePathUntracked, "untracked file");
497497

498498
bool wasCalled = false;

LibGit2Sharp.Tests/MockingFixture.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ public int NumberOfCommits
7373
[Fact]
7474
public void CanFakeConfigurationBuildSignature()
7575
{
76-
var name = "name";
77-
var email = "email";
76+
const string name = "name";
77+
const string email = "email";
7878
var now = DateTimeOffset.UtcNow;
7979

8080
var fakeConfig = new Mock<Configuration>();

0 commit comments

Comments
 (0)
0