public void TestExecuteWithOutPassword() { IDemo demo = XmlRpcProxyFactory.Create <IDemo>(); demo.WebAddress = new Uri("http://localhost:8084/TestRPC/GatewayOffice"); String res = demo.Add(4, 3.2, "", DateTime.Now, true); Assert.IsNotNull(res); }
public void TestExecute() { IDemo demo = XmlRpcProxyFactory.Create <IDemo>(); demo.WebAddress = new Uri("http://localhost:8084/TestRPC/GatewayOffice"); demo.Credentials = new System.Net.NetworkCredential("victor", "Lorenzana"); String res = demo.Add(4, 3.2, "", DateTime.Now, true); Assert.IsFalse(String.IsNullOrEmpty(res)); }
public void TestExecuteWithInvalidMethod() { IDemo demo = XmlRpcProxyFactory.Create <IDemo>(); demo.WebAddress = new Uri("http://localhost:8084/TestRPC/GatewayOffice"); demo.Credentials = new System.Net.NetworkCredential("victor", "Lorenzana"); String res = demo.Add(4, 3.2, "", DateTime.Now, 1); Assert.IsNotNull(res); }
public Task StartAsync(CancellationToken cancellationToken) { //jobClient.Enqueue(() => Console.WriteLine(DateTime.Now.ToString())); //backgroundJobQueue.EnqueueJobs(); //mediator.Publish(new Com.StarZ.MediatR.DemoNotification() { Message = "hahahah" }); //var r = mediator.Send(new Com.StarZ.MediatR.DemoRequest() { Message = "tttttt" }); //Console.WriteLine(r.Result.Message); RecurringJob.AddOrUpdate("Demo", () => demo.Add(), "*/5 * * * * *"); RecurringJob.AddOrUpdate(typeof(IDemo).FullName, () => demo.DoWork(), "*/30 * * * * *"); return(Task.CompletedTask); }
public void TestExecuteWithBadPath() { try { IDemo demo = XmlRpcProxyFactory.Create <IDemo>(); demo.WebAddress = new Uri("http://localhost:8084/TestRPC/GatewayOffice2"); demo.Credentials = new System.Net.NetworkCredential("victor", "Lorenzana"); String res = demo.Add(4, 3.2, "", DateTime.Now, true); Assert.IsNotNull(res); } catch (UriFormatException e) { Assert.Fail(e.Message); } }