public async Task GetArchive_ValidParameters_SetsCorrectResourceAndMethod() { var sut = new RepositoryRepository(_requestFactory); await sut.GetArchive(0); _requestFactory.Received().Create("projects/{projectId}/repository/archive", Method.Get); }
public async Task GetArchive_ValidParameters_AddsProjectIdUrlSegment() { const uint expected = 0; var sut = new RepositoryRepository(_requestFactory); await sut.GetArchive(expected); _request.Received().AddUrlSegment("projectId", expected); }
public async Task GetArchive_ShaIsSet_AddsShaParameter() { const string expected = "sha"; var sut = new RepositoryRepository(_requestFactory); await sut.GetArchive(0, expected); _request.Received().AddParameterIfNotNull("sha", expected); }