public async Task should_call_team_info_with_flurl() { var config = new ConfigReader().GetConfig(); var client = new FlurlTeamClient(new ResponseVerifier()); // when var response = await client.GetTeamInfo(config.Slack.ApiToken); // then response.ShouldNotBeNull(); }
public async Task WhenAskingTeamInfoThenServerReceive(SlackLibrary.Connections.Models.Team wantedResponse) { var port = GetRandomPort; using (var server = new SlackServer(port)) { server.MockDefaultTeamInfo(wantedResponse); ClientConstants.SlackApiHost = $"http://localhost:{port}"; var client = new FlurlTeamClient(new ResponseVerifier()); var response = await client.GetTeamInfo("SLACK_KEY"); response.ShouldDeepEqual(wantedResponse); } }