diff options
author | Jan Tattermusch <jtattermusch@google.com> | 2015-08-10 11:13:28 -0700 |
---|---|---|
committer | Jan Tattermusch <jtattermusch@google.com> | 2015-08-10 11:13:28 -0700 |
commit | 1338798897378d8d05ab2a4633f25bcd63cfdc87 (patch) | |
tree | bdad297d51b7182ea2d5c8a0b6f05257e1b6c655 | |
parent | 03ad9510cee313148e0f942e23bc202f956fda6d (diff) |
fix method signature and add test
-rw-r--r-- | src/csharp/Grpc.Core.Tests/GrpcEnvironmentTest.cs | 8 | ||||
-rw-r--r-- | src/csharp/Grpc.Core/GrpcEnvironment.cs | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/csharp/Grpc.Core.Tests/GrpcEnvironmentTest.cs b/src/csharp/Grpc.Core.Tests/GrpcEnvironmentTest.cs index 9ae12776f3..4ed93c7eca 100644 --- a/src/csharp/Grpc.Core.Tests/GrpcEnvironmentTest.cs +++ b/src/csharp/Grpc.Core.Tests/GrpcEnvironmentTest.cs @@ -69,5 +69,13 @@ namespace Grpc.Core.Tests Assert.IsFalse(object.ReferenceEquals(env1, env2)); } + + [Test] + public void GetCoreVersionString() + { + var coreVersion = GrpcEnvironment.GetCoreVersionString(); + var parts = coreVersion.Split('.'); + Assert.AreEqual(4, parts.Length); + } } } diff --git a/src/csharp/Grpc.Core/GrpcEnvironment.cs b/src/csharp/Grpc.Core/GrpcEnvironment.cs index 29a6ea7872..1bb83c9962 100644 --- a/src/csharp/Grpc.Core/GrpcEnvironment.cs +++ b/src/csharp/Grpc.Core/GrpcEnvironment.cs @@ -169,7 +169,7 @@ namespace Grpc.Core /// <summary> /// Gets version of gRPC C core. /// </summary> - internal string GetCoreVersionString() + internal static string GetCoreVersionString() { var ptr = grpcsharp_version_string(); // the pointer is not owned return Marshal.PtrToStringAnsi(ptr); |