public async Task GetAll_ValidParameters_SetsCorrectResourceAndMethod() { var sut = new CommitRepository(_requestFactory); await sut.GetAll(0); _requestFactory.Received().Create("projects/{projectId}/repository/commits", Method.Get); }
public async Task GetAll_ValidParameters_AddsProjectIdUrlSegment() { const uint expected = 0; var sut = new CommitRepository(_requestFactory); await sut.GetAll(expected); _request.Received().AddUrlSegment("projectId", expected); }
public async Task GetAll_SinceIsSet_AddsSinceParameter() { var expected = DateTime.MinValue; var sut = new CommitRepository(_requestFactory); await sut.GetAll(0, since : expected); _request.Received().AddParameterIfNotNull("since", expected); }
public async Task GetAll_UntilIsSet_AddsUntilParameter() { var expected = DateTime.MaxValue; var sut = new CommitRepository(_requestFactory); await sut.GetAll(0, until : expected); _request.Received().AddParameterIfNotNull("until", expected); }
public async Task GetAll_RefNameIsSet_AddsRefNameParameter() { const string expected = "refName"; var sut = new CommitRepository(_requestFactory); await sut.GetAll(0, expected); _request.Received().AddParameterIfNotNull("ref_name", expected); }