public async Task EnsuresArgumentsNotNull() { var client = Substitute.For <IApiConnection>(); var authEndpoint = new AuthorizationsClient(client); await Assert.ThrowsAsync <ArgumentNullException>(() => authEndpoint.GetAll(null)); }
public async Task EnsuresArgumentsNotNull() { var client = Substitute.For<IApiConnection>(); var authEndpoint = new AuthorizationsClient(client); await Assert.ThrowsAsync<ArgumentNullException>(() => authEndpoint.GetAll(null)); }
public void GetsAListOfAuthorizations() { var client = Substitute.For <IApiConnection>(); var authEndpoint = new AuthorizationsClient(client); authEndpoint.GetAll(); client.Received().GetAll <Authorization>(Arg.Is <Uri>(u => u.ToString() == "authorizations")); }
public void GetsAListOfAuthorizations() { var client = Substitute.For<IApiConnection>(); var authEndpoint = new AuthorizationsClient(client); authEndpoint.GetAll(); client.Received().GetAll<Authorization>(Arg.Is<Uri>(u => u.ToString() == "authorizations")); }
public void RequestsCorrectUrl() { var client = Substitute.For <IApiConnection>(); var authEndpoint = new AuthorizationsClient(client); authEndpoint.GetAll(); client.Received().GetAll <Authorization>( Arg.Is <Uri>(u => u.ToString() == "authorizations"), Args.ApiOptions); }
public void RequestsCorrectUrl() { var client = Substitute.For<IApiConnection>(); var authEndpoint = new AuthorizationsClient(client); authEndpoint.GetAll(); client.Received().GetAll<Authorization>( Arg.Is<Uri>(u => u.ToString() == "authorizations"), Args.ApiOptions); }
public void RequestsCorrectUrlWithApiOptions() { var client = Substitute.For <IApiConnection>(); var authEndpoint = new AuthorizationsClient(client); var options = new ApiOptions { StartPage = 1, PageSize = 1, PageCount = 1 }; authEndpoint.GetAll(options); client.Received().GetAll <Authorization>( Arg.Is <Uri>(u => u.ToString() == "authorizations"), options); }
public void RequestsCorrectUrlWithApiOptions() { var client = Substitute.For<IApiConnection>(); var authEndpoint = new AuthorizationsClient(client); var options = new ApiOptions { StartPage = 1, PageSize = 1, PageCount = 1 }; authEndpoint.GetAll(options); client.Received().GetAll<Authorization>( Arg.Is<Uri>(u => u.ToString() == "authorizations"), options); }