Skip to content

Commit 7fc6a33

Browse files
committed
Use PascalCasing for ProcessResult properties
1 parent fb85674 commit 7fc6a33

File tree

6 files changed

+31
-31
lines changed

6 files changed

+31
-31
lines changed

src/Dotnet.Script.Shared.Tests/ProcessResult.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,21 @@ public class ProcessResult
44
{
55
public ProcessResult(string output, int exitCode, string standardOut, string standardError)
66
{
7-
this.output = output;
8-
this.exitCode = exitCode;
9-
this.standardOut = standardOut;
10-
this.standardError = standardError;
7+
this.Output = output;
8+
this.ExitCode = exitCode;
9+
this.StandardOut = standardOut;
10+
this.StandardError = standardError;
1111
}
1212

13-
public string output { get; }
14-
public int exitCode { get; }
15-
public string standardOut { get; }
16-
public string standardError { get; }
13+
public string Output { get; }
14+
public int ExitCode { get; }
15+
public string StandardOut { get; }
16+
public string StandardError { get; }
1717

1818
public void Deconstruct(out string output, out int exitCode)
1919
{
20-
output = this.output;
21-
exitCode = this.exitCode;
20+
output = this.Output;
21+
exitCode = this.ExitCode;
2222
}
2323
}
2424
}

src/Dotnet.Script.Tests/ExecutionCacheTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,8 @@ public void ShouldCacheScriptsFromSameFolderIndividually()
136136
private (string output, string hash) Execute(string pathToScript)
137137
{
138138
var result = ScriptTestRunner.Default.Execute(pathToScript);
139-
testOutputHelper.WriteLine(result.output);
140-
Assert.Equal(0, result.exitCode);
139+
testOutputHelper.WriteLine(result.Output);
140+
Assert.Equal(0, result.ExitCode);
141141
string pathToExecutionCache = GetPathToExecutionCache(pathToScript);
142142
var pathToCacheFile = Path.Combine(pathToExecutionCache, "script.sha256");
143143
string cachedhash = null;
@@ -146,7 +146,7 @@ public void ShouldCacheScriptsFromSameFolderIndividually()
146146
cachedhash = File.ReadAllText(pathToCacheFile);
147147
}
148148

149-
return (result.output, cachedhash);
149+
return (result.Output, cachedhash);
150150
}
151151

152152
private static string GetPathToExecutionCache(string pathToScript)

src/Dotnet.Script.Tests/PackageSourceTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ public void ShouldHandleSpecifyingPackageSource()
1818
var fixture = "ScriptPackage/WithNoNuGetConfig";
1919
var pathToScriptPackages = ScriptPackagesFixture.GetPathToPackagesFolder();
2020
var result = ScriptTestRunner.Default.ExecuteFixture(fixture, $"--no-cache -s \"{pathToScriptPackages}\"");
21-
Assert.Contains("Hello", result.output);
22-
Assert.Equal(0, result.exitCode);
21+
Assert.Contains("Hello", result.Output);
22+
Assert.Equal(0, result.ExitCode);
2323
}
2424

2525
[Fact]
@@ -28,8 +28,8 @@ public void ShouldHandleSpecifyingPackageSourceWhenEvaluatingCode()
2828
var pathToScriptPackages = ScriptPackagesFixture.GetPathToPackagesFolder();
2929
var code = @"#load \""nuget:ScriptPackageWithMainCsx,1.0.0\"" SayHello();";
3030
var result = ScriptTestRunner.Default.Execute($"--no-cache -s \"{pathToScriptPackages}\" eval \"{code}\"");
31-
Assert.Contains("Hello", result.output);
32-
Assert.Equal(0, result.exitCode);
31+
Assert.Contains("Hello", result.Output);
32+
Assert.Equal(0, result.ExitCode);
3333
}
3434
}
3535
}

src/Dotnet.Script.Tests/ScriptExecutionTests.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ public void ShouldReturnExitCodeOneWhenScriptFailsToCompile()
8787
public void ShouldWriteCompilerWarningsToStandardError()
8888
{
8989
var result = ScriptTestRunner.Default.ExecuteFixture(fixture: "CompilationWarning", "--no-cache");
90-
Assert.True(string.IsNullOrWhiteSpace(result.standardOut));
91-
Assert.Contains("CS1998", result.standardError, StringComparison.OrdinalIgnoreCase);
90+
Assert.True(string.IsNullOrWhiteSpace(result.StandardOut));
91+
Assert.Contains("CS1998", result.StandardError, StringComparison.OrdinalIgnoreCase);
9292
}
9393

9494
[Fact]
@@ -254,7 +254,7 @@ public void ShouldSupportInlineNugetReferencesWithTrailingSemicoloninEvaluatedCo
254254
public void ShouldExecuteRemoteScript(string url, string output)
255255
{
256256
var result = ScriptTestRunner.Default.Execute(url);
257-
Assert.Contains(output, result.output);
257+
Assert.Contains(output, result.Output);
258258
}
259259

260260
[Fact]
@@ -337,19 +337,19 @@ public void ShouldThrowMeaningfulErrorMessageWhenDependencyIsNotFound()
337337

338338
// Run once to ensure that it is cached.
339339
var result = ScriptTestRunner.Default.Execute(pathToScript);
340-
Assert.Contains("42", result.output);
340+
Assert.Contains("42", result.Output);
341341

342342
// Remove the package from the global NuGet cache
343343
TestPathUtils.RemovePackageFromGlobalNugetCache("SampleLibrary");
344344

345345
//ScriptTestRunner.Default.ExecuteInProcess(pathToScript);
346346

347347
result = ScriptTestRunner.Default.Execute(pathToScript);
348-
Assert.Contains("Try executing/publishing the script", result.output);
348+
Assert.Contains("Try executing/publishing the script", result.Output);
349349

350350
// Run again with the '--no-cache' option to assert that the advice actually worked.
351351
result = ScriptTestRunner.Default.Execute($"{pathToScript} --no-cache");
352-
Assert.Contains("42", result.output);
352+
Assert.Contains("42", result.Output);
353353
}
354354

355355
[Fact]

src/Dotnet.Script.Tests/ScriptPackagesTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public void ShouldThrowMeaningfulExceptionWhenScriptPackageIsMissing()
3838

3939
// Run once to ensure that it is cached.
4040
var result = ScriptTestRunner.Default.Execute($"{pathToScriptFile} -s {pathToScriptPackages}");
41-
Assert.StartsWith("Hello from netstandard2.0", result.output);
41+
Assert.StartsWith("Hello from netstandard2.0", result.Output);
4242

4343
// Remove the package from the global NuGet cache
4444
TestPathUtils.RemovePackageFromGlobalNugetCache("ScriptPackageWithMainCsx");
@@ -48,7 +48,7 @@ public void ShouldThrowMeaningfulExceptionWhenScriptPackageIsMissing()
4848
File.WriteAllText(pathToScriptFile, code.ToString());
4949

5050
result = ScriptTestRunner.Default.Execute($"{pathToScriptFile} -s {pathToScriptPackages}");
51-
Assert.Contains("Try executing/publishing the script", result.output);
51+
Assert.Contains("Try executing/publishing the script", result.Output);
5252
}
5353

5454
[Fact]

src/Dotnet.Script.Tests/ScriptPublisherTests.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public void SimplePublishDllTest()
126126
var dllPath = Path.Combine("publish", "main.dll");
127127
var dllRunResult = ScriptTestRunner.Default.Execute($"exec {dllPath}", workspaceFolder.Path);
128128

129-
Assert.Equal(0, dllRunResult.exitCode);
129+
Assert.Equal(0, dllRunResult.ExitCode);
130130
}
131131

132132
[Fact]
@@ -143,7 +143,7 @@ public void SimplePublishDllFromCurrentDirectoryTest()
143143

144144
var dllRunResult = ScriptTestRunner.Default.Execute($"exec {dllPath}", workspaceFolder.Path);
145145

146-
Assert.Equal(0, dllRunResult.exitCode);
146+
Assert.Equal(0, dllRunResult.ExitCode);
147147
}
148148

149149
[Fact]
@@ -160,7 +160,7 @@ public void SimplePublishDllToOtherFolderTest()
160160
var dllPath = Path.Combine(publishFolder.Path, "main.dll");
161161
var dllRunResult = ScriptTestRunner.Default.Execute($"exec {dllPath}", publishFolder.Path);
162162

163-
Assert.Equal(0, dllRunResult.exitCode);
163+
Assert.Equal(0, dllRunResult.ExitCode);
164164
}
165165

166166
[Fact]
@@ -178,7 +178,7 @@ public void CustomDllNameTest()
178178
var dllPath = Path.Combine(workspaceFolder.Path, "publish", assemblyName);
179179
var dllRunResult = ScriptTestRunner.Default.Execute($"exec {dllPath}", workspaceFolder.Path);
180180

181-
Assert.Equal(0, dllRunResult.exitCode);
181+
Assert.Equal(0, dllRunResult.ExitCode);
182182
}
183183

184184
[Fact]
@@ -211,8 +211,8 @@ public void DllWithArgsTests()
211211
var dllPath = Path.Combine(workspaceFolder.Path, "publish", "main.dll");
212212
var dllRunResult = ScriptTestRunner.Default.Execute($"exec {dllPath} -- w o r l d", workspaceFolder.Path);
213213

214-
Assert.Equal(0, dllRunResult.exitCode);
215-
Assert.Contains("Hello world", dllRunResult.output);
214+
Assert.Equal(0, dllRunResult.ExitCode);
215+
Assert.Contains("Hello world", dllRunResult.Output);
216216
}
217217

218218
[Fact]

0 commit comments

Comments
 (0)