Skip to content

Commit

Permalink
TW-72618 Add build problems about compilation errors from .NET runner…
Browse files Browse the repository at this point in the history
… - add test
  • Loading branch information
NikolayPianikov authored and NikolayPianikov committed Aug 16, 2021
1 parent cefe2fb commit 7dee7c7
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,23 @@ public void ShouldSendBuildProblemWhenBuildErrorEvent()
// Then
_rootWriter.Verify(i => i.WriteBuildProblem("errorCode", "my error"), Times.Once());
}

[Fact]
public void ShouldSendBuildProblemWhenBuildErrorEventAndCodeIsNull()
{
// Given
var writer = CreateInstance();
writer.SetColor(Color.Error);
BuildEventArgs error = new BuildErrorEventArgs(string.Empty, null, string.Empty, 0, 0, 1, 1, string.Empty, string.Empty, string.Empty);
_eventContext.Setup(i => i.TryGetEvent(out error)).Returns(true);

// When
writer.Write("my");
writer.Write(" error\n");

// Then
_rootWriter.Verify(i => i.WriteBuildProblem("my error", "my error"), Times.Once());
}

[Fact]
public void ShouldSendBuildProblemWhenFinished()
Expand Down

0 comments on commit 7dee7c7

Please sign in to comment.