diff options
Diffstat (limited to 'src/csharp/Grpc.Examples.Tests/MathClientServerTests.cs')
-rw-r--r-- | src/csharp/Grpc.Examples.Tests/MathClientServerTests.cs | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/csharp/Grpc.Examples.Tests/MathClientServerTests.cs b/src/csharp/Grpc.Examples.Tests/MathClientServerTests.cs index 767340d6f2..c86da65af4 100644 --- a/src/csharp/Grpc.Examples.Tests/MathClientServerTests.cs +++ b/src/csharp/Grpc.Examples.Tests/MathClientServerTests.cs @@ -105,7 +105,7 @@ namespace math.Tests var recorder = new RecordingObserver<Num>(); client.Fib(new FibArgs.Builder { Limit = 6 }.Build(), recorder); - CollectionAssert.AreEqual(new List<long>{1, 1, 2, 3, 5, 8}, + CollectionAssert.AreEqual(new List<long> { 1, 1, 2, 3, 5, 8 }, recorder.ToList().Result.ConvertAll((n) => n.Num_)); } @@ -114,7 +114,8 @@ namespace math.Tests public void Sum() { var res = client.Sum(); - foreach (var num in new long[] { 10, 20, 30 }) { + foreach (var num in new long[] { 10, 20, 30 }) + { res.Inputs.OnNext(Num.CreateBuilder().SetNum_(num).Build()); } res.Inputs.OnCompleted(); @@ -125,7 +126,8 @@ namespace math.Tests [Test] public void DivMany() { - List<DivArgs> divArgsList = new List<DivArgs>{ + List<DivArgs> divArgsList = new List<DivArgs> + { new DivArgs.Builder { Dividend = 10, Divisor = 3 }.Build(), new DivArgs.Builder { Dividend = 100, Divisor = 21 }.Build(), new DivArgs.Builder { Dividend = 7, Divisor = 2 }.Build() @@ -142,9 +144,8 @@ namespace math.Tests var result = recorder.ToList().Result; - CollectionAssert.AreEqual(new long[] {3, 4, 3}, result.ConvertAll((divReply) => divReply.Quotient)); - CollectionAssert.AreEqual(new long[] {1, 16, 1}, result.ConvertAll((divReply) => divReply.Remainder)); + CollectionAssert.AreEqual(new long[] { 3, 4, 3 }, result.ConvertAll((divReply) => divReply.Quotient)); + CollectionAssert.AreEqual(new long[] { 1, 16, 1 }, result.ConvertAll((divReply) => divReply.Remainder)); } } } - |