diff options
Diffstat (limited to 'src/csharp/Grpc.Tools.Tests/ProtoCompileCommandLinePrinterTest.cs')
-rw-r--r-- | src/csharp/Grpc.Tools.Tests/ProtoCompileCommandLinePrinterTest.cs | 48 |
1 files changed, 26 insertions, 22 deletions
diff --git a/src/csharp/Grpc.Tools.Tests/ProtoCompileCommandLinePrinterTest.cs b/src/csharp/Grpc.Tools.Tests/ProtoCompileCommandLinePrinterTest.cs index a0406371dc..1773dcb875 100644 --- a/src/csharp/Grpc.Tools.Tests/ProtoCompileCommandLinePrinterTest.cs +++ b/src/csharp/Grpc.Tools.Tests/ProtoCompileCommandLinePrinterTest.cs @@ -20,28 +20,32 @@ using Microsoft.Build.Framework; using Moq; using NUnit.Framework; -namespace Grpc.Tools.Tests { - public class ProtoCompileCommandLinePrinterTest : ProtoCompileBasicTest { - [SetUp] - public new void SetUp() { - _task.Generator = "csharp"; - _task.OutputDir = "outdir"; - _task.ProtoBuf = Utils.MakeSimpleItems("a.proto"); +namespace Grpc.Tools.Tests +{ + public class ProtoCompileCommandLinePrinterTest : ProtoCompileBasicTest + { + [SetUp] + public new void SetUp() + { + _task.Generator = "csharp"; + _task.OutputDir = "outdir"; + _task.ProtoBuf = Utils.MakeSimpleItems("a.proto"); - _mockEngine - .Setup(me => me.LogMessageEvent(It.IsAny<BuildMessageEventArgs>())) - .Callback((BuildMessageEventArgs e) => - Assert.Fail($"Error logged by build engine:\n{e.Message}")) - .Verifiable("Command line was not output by the task."); - } + _mockEngine + .Setup(me => me.LogMessageEvent(It.IsAny<BuildMessageEventArgs>())) + .Callback((BuildMessageEventArgs e) => + Assert.Fail($"Error logged by build engine:\n{e.Message}")) + .Verifiable("Command line was not output by the task."); + } - void ExecuteExpectSuccess() { - _mockEngine - .Setup(me => me.LogErrorEvent(It.IsAny<BuildErrorEventArgs>())) - .Callback((BuildErrorEventArgs e) => - Assert.Fail($"Error logged by build engine:\n{e.Message}")); - bool result = _task.Execute(); - Assert.IsTrue(result); - } - }; + void ExecuteExpectSuccess() + { + _mockEngine + .Setup(me => me.LogErrorEvent(It.IsAny<BuildErrorEventArgs>())) + .Callback((BuildErrorEventArgs e) => + Assert.Fail($"Error logged by build engine:\n{e.Message}")); + bool result = _task.Execute(); + Assert.IsTrue(result); + } + }; } |