public async Task GreeterService_SayHelloUnary_ReturnsCorrectResponse() { // Arrange var service = new GreeterService(new Logger <GreeterService>(new NullLoggerFactory())); // Act var response = await service.SayHelloUnary(new HelloRequest { Name = "Joe" }, TestServerCallContext.Create()); // Assert Assert.AreEqual("Hello Joe", response.Message); }
public async Task Service_greets_sender_unary(GreeterService sut, string name, ServerCallContext context) { var response = await sut.SayHelloUnary(new HelloRequest { Name = name }, context); Assert.That(response.Message, Does.EndWith(name)); }