More consistent code style

This commit is contained in:
Oleksii Holub
2022-04-25 19:07:18 +03:00
parent 5d00de4dfe
commit ed3054c855
3 changed files with 9 additions and 5 deletions

View File

@@ -31,7 +31,8 @@ public class ConsoleSpecs : SpecsBase
var command = "Hello world" | Cli.Wrap("dotnet") var command = "Hello world" | Cli.Wrap("dotnet")
.WithArguments(a => a .WithArguments(a => a
.Add(Dummy.Program.Location) .Add(Dummy.Program.Location)
.Add("console-test")); .Add("console-test")
);
// Act // Act
var result = await command.ExecuteBufferedAsync(); var result = await command.ExecuteBufferedAsync();

View File

@@ -28,7 +28,8 @@ public class DirectivesSpecs : SpecsBase
var command = Cli.Wrap("dotnet") var command = Cli.Wrap("dotnet")
.WithArguments(a => a .WithArguments(a => a
.Add(Dummy.Program.Location) .Add(Dummy.Program.Location)
.Add("[debug]")) | stdOutBuffer; .Add("[debug]")
) | stdOutBuffer;
// Act // Act
try try
@@ -57,7 +58,7 @@ public class DirectivesSpecs : SpecsBase
} }
catch (OperationCanceledException) catch (OperationCanceledException)
{ {
// It's expected to fail // This is expected
} }
var stdOut = stdOutBuffer.ToString(); var stdOut = stdOutBuffer.ToString();

View File

@@ -246,9 +246,11 @@ public class Command : ICommand
var command = Cli.Wrap("dotnet") var command = Cli.Wrap("dotnet")
.WithArguments(a => a .WithArguments(a => a
.Add(Dummy.Program.Location) .Add(Dummy.Program.Location)
.Add("env-test")) .Add("env-test")
)
.WithEnvironmentVariables(e => e .WithEnvironmentVariables(e => e
.Set("ENV_TARGET", "Mars")); .Set("ENV_TARGET", "Mars")
);
// Act // Act
var result = await command.ExecuteBufferedAsync(); var result = await command.ExecuteBufferedAsync();