public async Task Compare_ValidParameters_SetsCorrectResourceAndMethod() { var sut = new RepositoryRepository(_requestFactory); await sut.Compare(0, "from", "to"); _requestFactory.Received().Create("projects/{projectId}/repository/compare", Method.Get); }
public async Task Compare_ValidParameters_AddsProjectIdUrlSegment() { const uint expected = 0; var sut = new RepositoryRepository(_requestFactory); await sut.Compare(expected, "from", "to"); _request.Received().AddUrlSegment("projectId", expected); }
public async Task Compare_ValidParameters_AddsToParameter() { const string expected = "to"; var sut = new RepositoryRepository(_requestFactory); await sut.Compare(0, "from", expected); _request.Received().AddParameter("to", expected); }
public async Task Compare_ToIsNull_ThrowsArgumentNullException() { var sut = new RepositoryRepository(_requestFactory); await Assert.ThrowsAsync <ArgumentNullException>(() => sut.Compare(0, "from", null)); }