diff options
author | kkm <kkm@smartaction.com> | 2018-10-07 00:39:02 -0700 |
---|---|---|
committer | kkm <kkm@smartaction.com> | 2018-10-07 03:09:54 -0700 |
commit | a844323c7e96d7a525b963769c2a8e7db5ea4b61 (patch) | |
tree | ecbd11692d26f99c3ce7a65fe35e6a12b59ce723 /src/csharp | |
parent | 51e41ae7d5f513d948a4b38fdb0914f8f1bf4773 (diff) |
Rename test classes *Test; UWYU in Tools.Test project
Diffstat (limited to 'src/csharp')
-rw-r--r-- | src/csharp/Grpc.Tools.Tests/CSharpGeneratorTests.cs | 7 | ||||
-rw-r--r-- | src/csharp/Grpc.Tools.Tests/CppGeneratorTests.cs | 7 | ||||
-rw-r--r-- | src/csharp/Grpc.Tools.Tests/DepFileUtilTests.cs | 6 | ||||
-rw-r--r-- | src/csharp/Grpc.Tools.Tests/GeneratorTests.cs | 5 | ||||
-rw-r--r-- | src/csharp/Grpc.Tools.Tests/NUnitMain.cs | 2 | ||||
-rw-r--r-- | src/csharp/Grpc.Tools.Tests/ProtoCompileBasicTests.cs | 6 | ||||
-rw-r--r-- | src/csharp/Grpc.Tools.Tests/ProtoCompileCommandLineGeneratorTests.cs | 5 | ||||
-rw-r--r-- | src/csharp/Grpc.Tools.Tests/ProtoCompileCommandLinePrinterTests.cs | 5 | ||||
-rw-r--r-- | src/csharp/Grpc.Tools.Tests/ProtoToolsPlatformTaskTests.cs (renamed from src/csharp/Grpc.Tools.Tests/ProtoToolsPlatformTaskTest.cs) | 4 | ||||
-rw-r--r-- | src/csharp/Grpc.Tools.Tests/Utils.cs | 3 | ||||
-rw-r--r-- | src/csharp/tests.json | 16 |
11 files changed, 25 insertions, 41 deletions
diff --git a/src/csharp/Grpc.Tools.Tests/CSharpGeneratorTests.cs b/src/csharp/Grpc.Tools.Tests/CSharpGeneratorTests.cs index dbffa65d8c..654500d53d 100644 --- a/src/csharp/Grpc.Tools.Tests/CSharpGeneratorTests.cs +++ b/src/csharp/Grpc.Tools.Tests/CSharpGeneratorTests.cs @@ -16,15 +16,10 @@ #endregion -using System.IO; -using Microsoft.Build.Framework; -using Microsoft.Build.Utilities; -using Moq; using NUnit.Framework; namespace Grpc.Tools.Tests { - - public class CSharpGeneratorTests : GeneratorTests { + public class CSharpGeneratorTest : GeneratorTest { GeneratorServices _generator; [SetUp] diff --git a/src/csharp/Grpc.Tools.Tests/CppGeneratorTests.cs b/src/csharp/Grpc.Tools.Tests/CppGeneratorTests.cs index e25a6498cd..a3450fae17 100644 --- a/src/csharp/Grpc.Tools.Tests/CppGeneratorTests.cs +++ b/src/csharp/Grpc.Tools.Tests/CppGeneratorTests.cs @@ -17,13 +17,10 @@ #endregion using System.IO; -using Microsoft.Build.Framework; -using Microsoft.Build.Utilities; -using Moq; using NUnit.Framework; namespace Grpc.Tools.Tests { - public class CppGeneratorTests : GeneratorTests { + public class CppGeneratorTest : GeneratorTest { GeneratorServices _generator; [SetUp] @@ -79,5 +76,5 @@ namespace Grpc.Tools.Tests { Assert.AreEqual(2, poss.Length); Assert.That(Path.GetDirectoryName(poss[0]), Is.EqualTo("out")); } - } + }; } diff --git a/src/csharp/Grpc.Tools.Tests/DepFileUtilTests.cs b/src/csharp/Grpc.Tools.Tests/DepFileUtilTests.cs index 42d0ae5998..ea34c89921 100644 --- a/src/csharp/Grpc.Tools.Tests/DepFileUtilTests.cs +++ b/src/csharp/Grpc.Tools.Tests/DepFileUtilTests.cs @@ -16,15 +16,13 @@ #endregion -using System; using System.IO; -using Grpc.Tools; using Microsoft.Build.Framework; using Microsoft.Build.Utilities; using NUnit.Framework; namespace Grpc.Tools.Tests { - public class DepFileUtilTests { + public class DepFileUtilTest { [Test] public void HashString64Hex_IsSane() { @@ -130,5 +128,5 @@ obj\Release x64\net45\/FooGrpc.cs: C:/usr/include/google/protobuf/wrappers.proto } catch { } } } - } + }; } diff --git a/src/csharp/Grpc.Tools.Tests/GeneratorTests.cs b/src/csharp/Grpc.Tools.Tests/GeneratorTests.cs index 93df9d6cab..52fab1d8ca 100644 --- a/src/csharp/Grpc.Tools.Tests/GeneratorTests.cs +++ b/src/csharp/Grpc.Tools.Tests/GeneratorTests.cs @@ -16,14 +16,13 @@ #endregion -using System.IO; using Microsoft.Build.Framework; using Microsoft.Build.Utilities; using Moq; using NUnit.Framework; namespace Grpc.Tools.Tests { - public class GeneratorTests { + public class GeneratorTest { protected Mock<IBuildEngine> _mockEngine; protected TaskLoggingHelper _log; @@ -47,5 +46,5 @@ namespace Grpc.Tools.Tests { Assert.IsNull(GeneratorServices.GetForLanguage(lang, _log)); _mockEngine.Verify(me => me.LogErrorEvent(It.IsAny<BuildErrorEventArgs>()), Times.Once); } - } + }; } diff --git a/src/csharp/Grpc.Tools.Tests/NUnitMain.cs b/src/csharp/Grpc.Tools.Tests/NUnitMain.cs index c4452c50d2..5a8ae8cf87 100644 --- a/src/csharp/Grpc.Tools.Tests/NUnitMain.cs +++ b/src/csharp/Grpc.Tools.Tests/NUnitMain.cs @@ -19,7 +19,7 @@ using System.Reflection; using NUnitLite; -namespace Grps.Tools.Tests { +namespace Grpc.Tools.Tests { static class NUnitMain { public static int Main(string[] args) => #if NETCOREAPP1_0 diff --git a/src/csharp/Grpc.Tools.Tests/ProtoCompileBasicTests.cs b/src/csharp/Grpc.Tools.Tests/ProtoCompileBasicTests.cs index 0660b3e33d..cf9d210424 100644 --- a/src/csharp/Grpc.Tools.Tests/ProtoCompileBasicTests.cs +++ b/src/csharp/Grpc.Tools.Tests/ProtoCompileBasicTests.cs @@ -16,13 +16,13 @@ #endregion -using System.Reflection; +using System.Reflection; // UWYU: Object.GetType() extension. using Microsoft.Build.Framework; using Moq; using NUnit.Framework; namespace Grpc.Tools.Tests { - public class ProtoCompileBasicTests { + public class ProtoCompileBasicTest { // Mock task class that stops right before invoking protoc. public class ProtoCompileTestable : ProtoCompile { public string LastPathToTool { get; private set; } @@ -66,5 +66,5 @@ namespace Grpc.Tools.Tests { Assert.NotNull(pinfo); Assert.That(pinfo, Has.Attribute<RequiredAttribute>()); } - } + }; } diff --git a/src/csharp/Grpc.Tools.Tests/ProtoCompileCommandLineGeneratorTests.cs b/src/csharp/Grpc.Tools.Tests/ProtoCompileCommandLineGeneratorTests.cs index fcdff11da4..c5d43f08d9 100644 --- a/src/csharp/Grpc.Tools.Tests/ProtoCompileCommandLineGeneratorTests.cs +++ b/src/csharp/Grpc.Tools.Tests/ProtoCompileCommandLineGeneratorTests.cs @@ -16,13 +16,12 @@ #endregion -using System.Reflection; using Microsoft.Build.Framework; using Moq; using NUnit.Framework; namespace Grpc.Tools.Tests { - internal class ProtoCompileCommandLineGeneratorTests : ProtoCompileBasicTests { + public class ProtoCompileCommandLineGeneratorTest : ProtoCompileBasicTest { [SetUp] public new void SetUp() { _task.Generator = "csharp"; @@ -158,5 +157,5 @@ namespace Grpc.Tools.Tests { Assert.That(_task.LastResponseFile, Does.Contain("--csharp_out=" + expect)); } - } + }; } diff --git a/src/csharp/Grpc.Tools.Tests/ProtoCompileCommandLinePrinterTests.cs b/src/csharp/Grpc.Tools.Tests/ProtoCompileCommandLinePrinterTests.cs index 91cfceaf56..a0406371dc 100644 --- a/src/csharp/Grpc.Tools.Tests/ProtoCompileCommandLinePrinterTests.cs +++ b/src/csharp/Grpc.Tools.Tests/ProtoCompileCommandLinePrinterTests.cs @@ -16,13 +16,12 @@ #endregion -using System.Reflection; using Microsoft.Build.Framework; using Moq; using NUnit.Framework; namespace Grpc.Tools.Tests { - internal class ProtoCompileCommandLinePrinterTests : ProtoCompileBasicTests { + public class ProtoCompileCommandLinePrinterTest : ProtoCompileBasicTest { [SetUp] public new void SetUp() { _task.Generator = "csharp"; @@ -44,5 +43,5 @@ namespace Grpc.Tools.Tests { bool result = _task.Execute(); Assert.IsTrue(result); } - } + }; } diff --git a/src/csharp/Grpc.Tools.Tests/ProtoToolsPlatformTaskTest.cs b/src/csharp/Grpc.Tools.Tests/ProtoToolsPlatformTaskTests.cs index 3ba0bdfbf6..235f8de527 100644 --- a/src/csharp/Grpc.Tools.Tests/ProtoToolsPlatformTaskTest.cs +++ b/src/csharp/Grpc.Tools.Tests/ProtoToolsPlatformTaskTests.cs @@ -22,11 +22,11 @@ using Moq; using NUnit.Framework; namespace Grpc.Tools.Tests { - // This test requires that environment variables be set to the exected + // This test requires that environment variables be set to the expected // output of the task in its external test harness: // PROTOTOOLS_TEST_CPU = { x64 | x86 } // PROTOTOOLS_TEST_OS = { linux | macosx | windows } - public class ProtoToolsPlatformTaskTests { + public class ProtoToolsPlatformTaskTest { static string s_expectOs; static string s_expectCpu; diff --git a/src/csharp/Grpc.Tools.Tests/Utils.cs b/src/csharp/Grpc.Tools.Tests/Utils.cs index 618e335452..bb051a4873 100644 --- a/src/csharp/Grpc.Tools.Tests/Utils.cs +++ b/src/csharp/Grpc.Tools.Tests/Utils.cs @@ -16,10 +16,7 @@ #endregion -using System; -using System.Collections.Generic; using System.Linq; -using System.Text; using Microsoft.Build.Framework; using Microsoft.Build.Utilities; diff --git a/src/csharp/tests.json b/src/csharp/tests.json index 761308b33f..760776f9e7 100644 --- a/src/csharp/tests.json +++ b/src/csharp/tests.json @@ -66,13 +66,13 @@ "Grpc.Reflection.Tests.SymbolRegistryTest" ], "Grpc.Tools.Tests": [ - "Grpc.Tools.Tests.CppGeneratorTests", - "Grpc.Tools.Tests.CSharpGeneratorTests", - "Grpc.Tools.Tests.DepFileUtilTests", - "Grpc.Tools.Tests.GeneratorTests", - "Grpc.Tools.Tests.ProtoCompileBasicTests", - "Grpc.Tools.Tests.ProtoCompileCommandLineGeneratorTests", - "Grpc.Tools.Tests.ProtoCompileCommandLinePrinterTests", - "Grpc.Tools.Tests.ProtoToolsPlatformTaskTests" + "Grpc.Tools.Tests.CppGeneratorTest", + "Grpc.Tools.Tests.CSharpGeneratorTest", + "Grpc.Tools.Tests.DepFileUtilTest", + "Grpc.Tools.Tests.GeneratorTest", + "Grpc.Tools.Tests.ProtoCompileBasicTest", + "Grpc.Tools.Tests.ProtoCompileCommandLineGeneratorTest", + "Grpc.Tools.Tests.ProtoCompileCommandLinePrinterTest", + "Grpc.Tools.Tests.ProtoToolsPlatformTaskTest" ] } |