public async Task CanStarAndUnstarAGist() { await _fixture.Star(testGistId); var isStarredTrue = await _fixture.IsStarred(testGistId); Assert.True(isStarredTrue); await _fixture.Unstar(testGistId); var isStarredFalse = await _fixture.IsStarred(testGistId); Assert.False(isStarredFalse); }
public async Task CanStarAndUnstarAGist() { Assert.DoesNotThrow(async() => { await _fixture.Star(testGistId); }); bool isStarredTrue = await _fixture.IsStarred(testGistId); Assert.True(isStarredTrue); Assert.DoesNotThrow(async() => { await _fixture.Unstar(testGistId); }); bool isStarredFalse = await _fixture.IsStarred(testGistId); Assert.False(isStarredFalse); }
/// <summary> /// Checks if the gist is starred /// </summary> /// <remarks> /// http://developer.github.com/v3/gists/#check-if-a-gist-is-starred /// </remarks> /// <param name="id">The id of the gist</param> public IObservable <bool> IsStarred(string id) { Ensure.ArgumentNotNullOrEmptyString(id, nameof(id)); return(_client.IsStarred(id).ToObservable()); }