public IEnumerable <string> Get() { var client = new RpcClient(new Uri("http://172.19.0.3:8545")); var ethAccounts = new EthAccounts(client); var accounts = ethAccounts.SendRequestAsync().Result; Logger.Debug($"Enviroment:{Environment.MachineName}. Method:{MethodBase.GetCurrentMethod().Name}."); return(new string[] { "value1", "value2" }); }
public async void ShouldInterceptNoParamsRequest() { var client = new RpcClient(new Uri("http://localhost:8545/")); client.OverridingRequestInterceptor = new OverridingInterceptorMock(); var ethAccounts = new EthAccounts(client); var accounts = await ethAccounts.SendRequestAsync(); Assert.True(accounts.Length == 2); Assert.Equal(accounts[0],"hello"); }
public async void ShouldInterceptNoParamsRequest() { var client = new HttpClient(new Uri("http://localhost:8545/"), defaultTimeOutForTests); client.OverridingRequestInterceptor = new OverridingInterceptorMock(); var ethAccounts = new EthAccounts(client); var accounts = await ethAccounts.SendRequestAsync(); Assert.True(accounts.Length == 2); Assert.Equal("hello", accounts[0]); }
public override async Task <string[]> ExecuteAsync(IClient client) { var ethAccounts = new EthAccounts(client); return(await ethAccounts.SendRequestAsync()); }
public async Task<dynamic> ExecuteTestAsync(RpcClient client) { var ethAccounts = new EthAccounts(client); return await ethAccounts.SendRequestAsync(); }
public async Task <dynamic> ExecuteTestAsync(RpcClient client) { var ethAccounts = new EthAccounts(client); return(await ethAccounts.SendRequestAsync()); }