public void EnsuresNonNullArguments() { var connection = Substitute.For <IApiConnection>(); var client = new TeamsClient(connection); Assert.Throws <ArgumentNullException>(() => client.UpdateTeam(1, null)); }
public async Task EnsuresNonNullArguments() { var connection = Substitute.For <IApiConnection>(); var client = new TeamsClient(connection); AssertEx.Throws <ArgumentNullException>(async() => await client.UpdateTeam(1, null)); }
public void RequestsTheCorrectUrl() { var connection = Substitute.For<IApiConnection>(); var client = new TeamsClient(connection); var team = new UpdateTeam("Octokittens"); client.UpdateTeam(1, team); connection.Received().Patch<Team>(Arg.Is<Uri>(u => u.ToString() == "teams/1"), team); }
public void RequestsTheCorrectUrl() { var connection = Substitute.For <IApiConnection>(); var client = new TeamsClient(connection); var team = new UpdateTeam("Octokittens"); client.UpdateTeam(1, team); connection.Received().Patch <Team>(Arg.Is <Uri>(u => u.ToString() == "teams/1"), team); }
public async Task EnsuresNonNullArguments() { var connection = Substitute.For<IApiConnection>(); var client = new TeamsClient(connection); AssertEx.Throws<ArgumentNullException>(async () => await client.UpdateTeam(1, null)); }
public void EnsuresNonNullArguments() { var connection = Substitute.For<IApiConnection>(); var client = new TeamsClient(connection); Assert.Throws<ArgumentNullException>(() => client.UpdateTeam(1, null)); }