public async Task get_empty_list_of_labels() { // act IEnumerable <LabelSubscriptionModel> list = await LabelSubscription.GetUserSubscriptions(RepoOwner, RepoName, UserId); list.Should().NotBeNull().And.BeEmpty(); }
public async Task add_label_then_list_it() { // act await LabelSubscription.SetUserSubscription(RepoOwner, RepoName, UserId, "Bug"); IEnumerable <LabelSubscriptionModel> list = await LabelSubscription.GetUserSubscriptions(RepoOwner, RepoName, UserId); list.Should().NotBeNull() .And.Contain(o => o.Label == "Bug" && o.UserId == UserId); }
public async Task add_labels_then_list_them() { // act await LabelSubscription.SetUserSubscriptions(RepoOwner, RepoName, UserId, new[] { "Bug", "Wonder" }); IEnumerable <LabelSubscriptionModel> list = await LabelSubscription.GetUserSubscriptions(RepoOwner, RepoName, UserId); list.Should().NotBeNull() .And.HaveCount(2) .And.Contain(o => o.Label == "Bug" && o.UserId == UserId) .And.Contain(o => o.Label == "Wonder" && o.UserId == UserId); }