public static async Task FibExample(MathGrpc.IMathServiceClient stub) { var recorder = new RecordingObserver <Num>(); stub.Fib(new FibArgs.Builder { Limit = 5 }.Build(), recorder); List <Num> result = await recorder.ToList(); Console.WriteLine("Fib Result: " + string.Join("|", result)); }
public void Fib() { 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 }, recorder.ToList().Result.ConvertAll((n) => n.Num_)); }