public async Task GetProxyReturnsAProxy() { //Arrange var proxyService = new ProxyService(); //Act var proxy = await proxyService.GetProxy(); //Assert Assert.IsTrue(proxy.Host != null && proxy.Port != 0); }
public ApiResult <Proxy> One() { try { var proxy = proxyService.GetProxy(); return(new ApiResult <Proxy>() { Status = true, Message = "ok", Result = proxy }); } catch (Exception ex) { return(new ApiResult <Proxy>() { Status = false, Message = ex.Message }); } }