public FlurlChannelClientTests() { _httpTest = new HttpTest(); _responseVerifierMock = new Mock <IResponseVerifier>(); _channelClient = new FlurlChannelClient(_responseVerifierMock.Object); _userClient = new FlurlUserClient(_responseVerifierMock.Object); }
public async Task WhenAskingForUserInfoThenServerReceive(SlackLibrary.Connections.Models.User wantedResponse) { var port = GetRandomPort; using (var server = new SlackServer(port)) { server.MockUserInfo(wantedResponse); ClientConstants.SlackApiHost = $"http://localhost:{port}"; var client = new FlurlUserClient(new ResponseVerifier()); var response = await client.Info("SLACK_KEY", wantedResponse.Id); response.WithDeepEqual(wantedResponse) .IgnoreSourceProperty(x => x.Updated) .Assert(); } }