public async Task Unsubscribe_ValidParameters_SetsCorrectResourceAndMethod() { var sut = new LabelRepository(_requestFactory); await sut.Unsubscribe(0, "name"); _requestFactory.Received().Create("projects/{projectId}/labels/{labelId}/subscription", Method.Delete); }
public async Task Unsubscribe_ValidParameters_AddsLabelIdUrlSegment() { const string expected = "name"; var sut = new LabelRepository(_requestFactory); await sut.Unsubscribe(0, expected); _request.Received().AddUrlSegment("labelId", expected); }
public async Task Unsubscribe_ValidParameters_AddsProjectIdUrlSegment() { const uint expected = 0; var sut = new LabelRepository(_requestFactory); await sut.Unsubscribe(expected, "name"); _request.Received().AddUrlSegment("projectId", expected); }
public async Task Unsubscribe_NameIsNull_ThrowsArgumentNullException() { var sut = new LabelRepository(_requestFactory); await Assert.ThrowsAsync <ArgumentNullException>(() => sut.Unsubscribe(0, null)); }