Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Unified Diff: third_party/grpc/src/csharp/Grpc.Core.Tests/FakeCredentials.cs

Issue 1932353002: Initial checkin of gRPC to third_party/ Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/grpc/src/csharp/Grpc.Core.Tests/FakeCredentials.cs
diff --git a/third_party/protobuf/csharp/src/Google.Protobuf.Test/DeprecatedMemberTest.cs b/third_party/grpc/src/csharp/Grpc.Core.Tests/FakeCredentials.cs
similarity index 64%
copy from third_party/protobuf/csharp/src/Google.Protobuf.Test/DeprecatedMemberTest.cs
copy to third_party/grpc/src/csharp/Grpc.Core.Tests/FakeCredentials.cs
index 8dfad8b331c1622d9325af438a1eaa6e1c5c25fd..144b8320b9df5c276fe8a19f773e4a61593cc1de 100644
--- a/third_party/protobuf/csharp/src/Google.Protobuf.Test/DeprecatedMemberTest.cs
+++ b/third_party/grpc/src/csharp/Grpc.Core.Tests/FakeCredentials.cs
@@ -1,7 +1,7 @@
-#region Copyright notice and license
-// Protocol Buffers - Google's data interchange format
-// Copyright 2015 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
+#region Copyright notice and license
+
+// Copyright 2015, Google Inc.
+// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
@@ -28,28 +28,46 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
#endregion
-
+
using System;
-using System.Reflection;
-using Google.Protobuf.TestProtos;
+using System.Diagnostics;
+using System.Runtime.InteropServices;
+using System.Threading;
+using System.Threading.Tasks;
+using Grpc.Core;
+using Grpc.Core.Internal;
+using Grpc.Core.Utils;
using NUnit.Framework;
-namespace Google.Protobuf
+namespace Grpc.Core.Tests
{
- public class DeprecatedMemberTest
+ internal class FakeChannelCredentials : ChannelCredentials
{
- private static void AssertIsDeprecated(MemberInfo member)
+ readonly bool composable;
+
+ public FakeChannelCredentials(bool composable)
{
- Assert.NotNull(member);
- Assert.IsTrue(member.IsDefined(typeof(ObsoleteAttribute), false), "Member not obsolete: " + member);
+ this.composable = composable;
}
- [Test]
- public void TestDepreatedPrimitiveValue()
+ internal override bool IsComposable
{
- AssertIsDeprecated(typeof(TestDeprecatedFields).GetProperty("DeprecatedInt32"));
+ get { return composable; }
}
+ internal override ChannelCredentialsSafeHandle ToNativeCredentials()
+ {
+ return null;
+ }
+ }
+
+ internal class FakeCallCredentials : CallCredentials
+ {
+ internal override CallCredentialsSafeHandle ToNativeCredentials()
+ {
+ return null;
+ }
}
}

Powered by Google App Engine
This is Rietveld 408576698