public async void GetGRPCServiceTest() { _conn = new GRPCConnection(_balancer, _grpcServiceFinder); var grpcService = await _conn.GetGRPCService<IGrpcService>(string.Empty); Assert.Null(grpcService); }
public void GRPCConnectionTest() { Assert.Throws<AngleExceptions>(() => { _conn = new GRPCConnection(null, null); }); _conn = new GRPCConnection(_balancer, _grpcServiceFinder); Assert.NotNull(_conn); }
static void Main(string[] args) { IGRPCConnection conn = new GRPCConnection(null, null); var grpcService = new MicroAngels.GRPC.Client.GRPCService("192.168.1.8", 1999); var service = conn.GetGRPCService <IPingService>(grpcService).Result; var pong = service.Ping(new Ping { Message = "Hello GRPC" }); Console.WriteLine("Client Received:" + pong.ResponseAsync.Result.Message); Console.ReadLine(); }