Beispiel #1
0
        public void GreeterTest()
        {
            GreeterImpl client = new GreeterImpl();

            string user  = "******";
            var    reply = client.SayHello(new HelloRequest {
                Name = user
            }, null).Result;

            Console.WriteLine("Greeting: " + reply.Message);
        }
Beispiel #2
0
        public void SayHello_ReturnAddHelloBeforeName(string name)
        {
            var request = new HelloRequest
            {
                Name = name
            };

            var actual = _greeterImpl.SayHello(request, null).Result;

            Assert.Equal($"Hello {name}", actual.Message);
        }
Beispiel #3
0
        static void Main(string[] args)
        {
            while (true)
            {
                GreeterImpl client = new GreeterImpl();

                Console.Write("Input your name: ");
                String user = Console.ReadLine();

                var reply = client.SayHello(new HelloRequest {
                    Name = user
                }, null).Result;
                Console.WriteLine("Greeting: " + reply.Message);
            }
        }