public async Task GetAll_ValidParameters_SetsCorrectResourceAndMethod() { var sut = new NamespaceRepository(_requestFactory); await sut.GetAll(); _requestFactory.Received().Create("namespaces", Method.Get); }
public async Task GetAll_ResultsPerPageIsSet_AddsPerPageParameter() { const uint expected = 5; var sut = new NamespaceRepository(_requestFactory); await sut.GetAll(resultsPerPage : expected); _request.Received().AddParameter("per_page", expected); }
public async Task GetAll_ResultsPerPageIsLessThanMinimum_ThrowsArgumentOutOfRangeException() { var sut = new NamespaceRepository(_requestFactory); await Assert.ThrowsAsync <ArgumentOutOfRangeException>(() => sut.GetAll(resultsPerPage: uint.MinValue)); }