public void GreeterTest() { GreeterImpl client = new GreeterImpl(); string user = "******"; var reply = client.SayHello(new HelloRequest { Name = user }, null).Result; Console.WriteLine("Greeting: " + reply.Message); }
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); }
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); } }