Skip to content

Commit cd04239

Browse files
committed
explicitly set the private accessibility modifier
1 parent 70545c6 commit cd04239

File tree

84 files changed

+191
-190
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+191
-190
lines changed

src/GitVersionCore.Tests/BuildServers/AzurePipelinesBuildNumberTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ namespace GitVersionCore.Tests.BuildServers
99
[TestFixture]
1010
public class AzurePipelinesBuildNumberTests : TestBase
1111
{
12-
string key = "BUILD_BUILDNUMBER";
13-
string logPrefix = "##vso[build.updatebuildnumber]";
14-
AzurePipelines versionBuilder;
12+
private string key = "BUILD_BUILDNUMBER";
13+
private string logPrefix = "##vso[build.updatebuildnumber]";
14+
private AzurePipelines versionBuilder;
1515

1616
private IEnvironment environment;
1717
private ILog log;

src/GitVersionCore.Tests/BuildServers/AzurePipelinesTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace GitVersionCore.Tests.BuildServers
99
[TestFixture]
1010
public class AzurePipelinesTests : TestBase
1111
{
12-
string key = "BUILD_BUILDNUMBER";
12+
private string key = "BUILD_BUILDNUMBER";
1313

1414
private IEnvironment environment;
1515
private ILog log;

src/GitVersionCore.Tests/BuildServers/BuildServerBaseTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public void BuildNumberIsFullSemVer()
4949
writes[1].ShouldBe("1.2.3-beta.1+5");
5050
}
5151

52-
class BuildServer : BuildServerBase
52+
private class BuildServer : BuildServerBase
5353
{
5454
protected override string EnvironmentVariable { get; }
5555

src/GitVersionCore.Tests/BuildServers/EnvironmentVariableJenkinsTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ namespace GitVersionCore.Tests.BuildServers
99
[TestFixture]
1010
public class EnvironmentVariableJenkinsTests : TestBase
1111
{
12-
string key = "JENKINS_URL";
13-
string branch = "GIT_BRANCH";
14-
string localBranch = "GIT_LOCAL_BRANCH";
15-
string pipelineBranch = "BRANCH_NAME";
12+
private string key = "JENKINS_URL";
13+
private string branch = "GIT_BRANCH";
14+
private string localBranch = "GIT_LOCAL_BRANCH";
15+
private string pipelineBranch = "BRANCH_NAME";
1616
private IEnvironment environment;
1717
private ILog log;
1818

src/GitVersionCore.Tests/ConfigProviderTests.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ public class ConfigProviderTests : TestBase
2020
{
2121
private const string DefaultRepoPath = @"c:\MyGitRepo";
2222

23-
string repoPath;
24-
IFileSystem fileSystem;
25-
IConfigFileLocator configFileLocator;
23+
private string repoPath;
24+
private IFileSystem fileSystem;
25+
private IConfigFileLocator configFileLocator;
2626

2727
[SetUp]
2828
public void Setup()
@@ -290,12 +290,12 @@ public void NoWarnOnGitVersionYmlFile()
290290
stringLogger.Length.ShouldBe(0);
291291
}
292292

293-
string SetupConfigFileContent(string text, string fileName = DefaultConfigFileLocator.DefaultFileName)
293+
private string SetupConfigFileContent(string text, string fileName = DefaultConfigFileLocator.DefaultFileName)
294294
{
295295
return SetupConfigFileContent(text, fileName, repoPath);
296296
}
297297

298-
string SetupConfigFileContent(string text, string fileName, string path)
298+
private string SetupConfigFileContent(string text, string fileName, string path)
299299
{
300300
var fullPath = Path.Combine(path, fileName);
301301
fileSystem.WriteAllText(fullPath, text);

src/GitVersionCore.Tests/DefaultConfigFileLocatorTests.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ public class DefaultConfigFileLocatorTests : TestBase
1515
private const string DefaultRepoPath = @"c:\MyGitRepo";
1616
private const string DefaultWorkingPath = @"c:\MyGitRepo\Working";
1717

18-
string repoPath;
19-
string workingPath;
20-
IFileSystem fileSystem;
18+
private string repoPath;
19+
private string workingPath;
20+
private IFileSystem fileSystem;
2121

2222
[SetUp]
2323
public void Setup()
@@ -94,12 +94,12 @@ public void NoWarnOnGitVersionYmlFile()
9494
output.Length.ShouldBe(0);
9595
}
9696

97-
string SetupConfigFileContent(string text, string fileName = DefaultConfigFileLocator.DefaultFileName)
97+
private string SetupConfigFileContent(string text, string fileName = DefaultConfigFileLocator.DefaultFileName)
9898
{
9999
return SetupConfigFileContent(text, fileName, repoPath);
100100
}
101101

102-
string SetupConfigFileContent(string text, string fileName, string path)
102+
private string SetupConfigFileContent(string text, string fileName, string path)
103103
{
104104
var fullPath = Path.Combine(path, fileName);
105105
fileSystem.WriteAllText(fullPath, text);

src/GitVersionCore.Tests/DynamicRepositoryTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace GitVersionCore.Tests
88
[TestFixture]
99
public class DynamicRepositoryTests : TestBase
1010
{
11-
string workDirectory;
11+
private string workDirectory;
1212

1313
private void ClearReadOnly(DirectoryInfo parentDirectory)
1414
{

src/GitVersionCore.Tests/GitToolsTestingExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public static void AssertFullSemver(this RepositoryFixtureBase fixture, Config c
6969
}
7070
}
7171

72-
static SemanticVersion ExecuteGitVersion(GitVersionContext context)
72+
private static SemanticVersion ExecuteGitVersion(GitVersionContext context)
7373
{
7474
var vf = new GitVersionFinder();
7575
return vf.FindVersion(new NullLog(), context);

src/GitVersionCore.Tests/GitVersionContextBuilder.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ namespace GitVersionCore.Tests
99
{
1010
public class GitVersionContextBuilder
1111
{
12-
IRepository repository;
13-
Config config;
12+
private IRepository repository;
13+
private Config config;
1414

1515
public GitVersionContextBuilder WithRepository(IRepository repository)
1616
{
@@ -68,7 +68,7 @@ public GitVersionContext Build()
6868
return new GitVersionContext(repo, new NullLog(), repo.Head, configuration);
6969
}
7070

71-
IRepository CreateRepository()
71+
private IRepository CreateRepository()
7272
{
7373
var mockBranch = new MockBranch("master") { new MockCommit { CommitterEx = Generate.SignatureNow() } };
7474
var mockRepository = new MockRepository

src/GitVersionCore.Tests/Helpers/DirectoryHelper.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace GitVersionCore.Tests.Helpers
77
{
88
public static class DirectoryHelper
99
{
10-
static Dictionary<string, string> toRename = new Dictionary<string, string>
10+
private static Dictionary<string, string> toRename = new Dictionary<string, string>
1111
{
1212
{"gitted", ".git"},
1313
{"gitmodules", ".gitmodules"},
@@ -27,7 +27,7 @@ public static void CopyFilesRecursively(DirectoryInfo source, DirectoryInfo targ
2727
}
2828
}
2929

30-
static string Rename(string name)
30+
private static string Rename(string name)
3131
{
3232
return toRename.ContainsKey(name) ? toRename[name] : name;
3333
}

0 commit comments

Comments
 (0)