public void RemoteInvokeTest() { RemoteWritter.ComplieToRemote <RemoteTestModel>(); TransportParameters parameters = new TransportParameters { TypeName = "RemoteTestModel", MethodName = "HelloString" }; parameters["str1"] = JsonConvert.SerializeObject("hello "); parameters["str2"] = JsonConvert.SerializeObject("world!"); string result = RemoteReader.Execute(parameters); Assert.Equal("\"hello world!\"", result); var parameter = new RequestParameters <RemoteTestModel>(); var temp = parameter["HelloString"].Params("hello ", "world!"); result = JsonConvert.DeserializeObject <string>(RemoteReader.Execute(temp)); Assert.Equal("hello world!", result); parameter = new RequestParameters <RemoteTestModel>(); temp = parameter["HelloInt"].Params(10, 100); int intResult = JsonConvert.DeserializeObject <int>(RemoteReader.Execute(temp)); Assert.Equal(110, intResult); }
public void RemoteDelegateTest() { RemoteWritter.ComplieToRemote <RemoteTestModel>(); RemoteParameters parameters = new RemoteParameters(); parameters.TypeName = "RemoteTestModel"; parameters.MethodName = "HelloString"; Assert.NotNull(RemoteReader.GetFunc(parameters)); }
public void RemoteDelegateTest() { RemoteWritter.ComplieToRemote <RemoteTestModel>(); TransportParameters parameters = new TransportParameters { TypeName = "RemoteTestModel", MethodName = "HelloString" }; Assert.NotNull(RemoteReader.GetFunc(parameters)); }