public void RequestsTheCorrectUrl() { var connection = Substitute.For<IApiConnection>(); var client = new TeamsClient(connection); client.GetAllTeams("orgName"); connection.Received().GetAll<Team>(Arg.Is<Uri>(u => u.ToString() == "orgs/orgName/teams")); }
public void RequestsTheCorrectUrl() { var connection = Substitute.For <IApiConnection>(); var client = new TeamsClient(connection); client.GetAllTeams("orgName"); connection.Received().GetAll <Team>(Arg.Is <Uri>(u => u.ToString() == "orgs/orgName/teams")); }
public async Task EnsuresNonNullArguments() { var teams = new TeamsClient(Substitute.For<IApiConnection>()); AssertEx.Throws<ArgumentNullException>(async () => await teams.GetAllTeams(null)); }
public void EnsuresNonNullArguments() { var teams = new TeamsClient(Substitute.For <IApiConnection>()); Assert.Throws <ArgumentNullException>(() => teams.GetAllTeams(null)); }
public void EnsuresNonNullArguments() { var teams = new TeamsClient(Substitute.For<IApiConnection>()); Assert.Throws<ArgumentNullException>(() => teams.GetAllTeams(null)); }
public async Task EnsuresNonNullArguments() { var teams = new TeamsClient(Substitute.For <IApiConnection>()); AssertEx.Throws <ArgumentNullException>(async() => await teams.GetAllTeams(null)); }