PR feedback

pull/22743/head
James Newton-King 5 years ago
parent bb557bb6ff
commit bba2a77199
No known key found for this signature in database
GPG Key ID: A66B2F456BF5526
  1. 20
      src/csharp/Grpc.Core.Tests/MetadataTest.cs

@ -295,11 +295,11 @@ namespace Grpc.Core.Tests
{ "xyz-bin", Encoding.ASCII.GetBytes("xyz-value1") }, { "xyz-bin", Encoding.ASCII.GetBytes("xyz-value1") },
}; };
var abcEntry = metadata.GetValue("abc"); var abcValue = metadata.GetValue("abc");
Assert.AreEqual("abc-value2", abcEntry); Assert.AreEqual("abc-value2", abcValue);
var xyzEntry = metadata.GetValue("xyz"); var xyzValue = metadata.GetValue("xyz");
Assert.AreEqual("xyz-value1", xyzEntry); Assert.AreEqual("xyz-value1", xyzValue);
var notFound = metadata.GetValue("not-found"); var notFound = metadata.GetValue("not-found");
Assert.AreEqual(null, notFound); Assert.AreEqual(null, notFound);
@ -326,11 +326,11 @@ namespace Grpc.Core.Tests
{ "xyz-bin", Encoding.ASCII.GetBytes("xyz-value1") }, { "xyz-bin", Encoding.ASCII.GetBytes("xyz-value1") },
}; };
var abcEntry = metadata.GetValueBytes("abc-bin"); var abcValue = metadata.GetValueBytes("abc-bin");
Assert.AreEqual(Encoding.ASCII.GetBytes("abc-value2"), abcEntry); Assert.AreEqual(Encoding.ASCII.GetBytes("abc-value2"), abcValue);
var xyzEntry = metadata.GetValueBytes("xyz-bin"); var xyzValue = metadata.GetValueBytes("xyz-bin");
Assert.AreEqual(Encoding.ASCII.GetBytes("xyz-value1"), xyzEntry); Assert.AreEqual(Encoding.ASCII.GetBytes("xyz-value1"), xyzValue);
var notFound = metadata.GetValueBytes("not-found"); var notFound = metadata.GetValueBytes("not-found");
Assert.AreEqual(null, notFound); Assert.AreEqual(null, notFound);
@ -344,8 +344,8 @@ namespace Grpc.Core.Tests
{ "xyz", "xyz-value1" }, { "xyz", "xyz-value1" },
}; };
var xyzEntry = metadata.GetValueBytes("xyz"); var xyzValue = metadata.GetValueBytes("xyz");
Assert.AreEqual(Encoding.ASCII.GetBytes("xyz-value1"), xyzEntry); Assert.AreEqual(Encoding.ASCII.GetBytes("xyz-value1"), xyzValue);
} }
private Metadata CreateMetadata() private Metadata CreateMetadata()

Loading…
Cancel
Save