Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,20 @@ public void Should_End_Group()
Assert.Contains(fixture.Writer.Entries, m => m == $"##[endgroup]");
}

[Fact]
public void Should_Command_With_CommandLine()
{
// Given
var fixture = new AzurePipelinesFixture();
var service = fixture.CreateAzurePipelinesService();

// When
service.Commands.Command("Example Command");

// Then
Assert.Contains(fixture.Writer.Entries, m => m == $"##[command]Example Command");
}

[Fact]
public void Should_Section_With_Name()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@ public void EndGroup()
WriteFormatCommand("endgroup", string.Empty);
}

/// <inheritdoc/>
public void Command(string commandLine)
{
WriteFormatCommand("command", commandLine);
}

/// <inheritdoc/>
public void Section(string name)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ public interface IAzurePipelinesCommands
/// </summary>
public void EndGroup();

/// <summary>
/// Log command.
/// </summary>
/// <param name="commandLine">The command-line being run.</param>
public void Command(string commandLine);

/// <summary>
/// Log section.
/// </summary>
Expand Down
Loading