예제 #1
0
        public async Task Fib()
        {
            using (var call = client.Fib(new FibArgs {
                Limit = 6
            }))
            {
                var responses = await call.ResponseStream.ToListAsync();

                CollectionAssert.AreEqual(new List <long> {
                    1, 1, 2, 3, 5, 8
                },
                                          responses.Select((n) => n.Num_));
            }
        }
예제 #2
0
 public void Fib()
 {
     Task.Run(async() =>
     {
         using (var call = client.Fib(new FibArgs.Builder {
             Limit = 6
         }.Build()))
         {
             var responses = await call.ResponseStream.ToList();
             CollectionAssert.AreEqual(new List <long> {
                 1, 1, 2, 3, 5, 8
             },
                                       responses.ConvertAll((n) => n.Num_));
         }
     }).Wait();
 }