using JsonRpcLite.Network; using JsonRpcLite.Rpc; using System; using System.Net; using WingInterfaceLibrary.Enum; using WingInterfaceLibrary.Interface; using WingInterfaceLibrary.Request.User; namespace Flyinsono.Client.Test { internal interface IClientTestManager : IClientManager { /// /// Run the test cases /// void Run(string remoteUrl); } internal class ClientTestManager : IClientTestManager { public async void Run(string remoteUrl) { try { var clientEngine = new JsonRpcHttpClientEngine(remoteUrl); var client = new JsonRpcClient(); client.UseEngine(clientEngine); var proxy = client.CreateProxy(); var request = new CommonLoginRequest(); request.LoginSource = LoginSource.PC; request.AnyAccount = "fly11"; request.Password = "7a9da7f9ffc92a1d9e3b9d87137eb3c1"; var result = await proxy.CommonLoginAsync(request); Logger.WriteLineInfo($"result:{result.AccountName}- {result.LoginState} - {result.Token}"); } catch(Exception ex) { Logger.WriteLineError($"Test run ex:{ex}"); } } public void Dispose() { //throw new System.NotImplementedException(); } } }