mirror of
https://github.com/zoriya/octokit.net.git
synced 2025-12-06 07:16:09 +00:00
* bugfix - PUT should have a payload for Mark as Read * also fix the Observable client test * add integration tests for MarkRead methods * Fixup MarkReadForRepository methods to specify a body in the PUT request * Fix unit tests for regular and observable client * helps if the new files are included in the test project :)
41 lines
1.0 KiB
C#
41 lines
1.0 KiB
C#
using System.Threading.Tasks;
|
|
using Octokit.Tests.Integration;
|
|
using Xunit;
|
|
|
|
public class NotificationsClientTests
|
|
{
|
|
public class TheMarkAsReadMethod
|
|
{
|
|
[IntegrationTest]
|
|
public async Task MarksNotificationsRead()
|
|
{
|
|
var github = Helper.GetAuthenticatedClient();
|
|
|
|
await github.Activity.Notifications.MarkAsRead();
|
|
}
|
|
}
|
|
|
|
public class TheMarkAsReadForRepositoryMethod
|
|
{
|
|
[IntegrationTest]
|
|
public async Task MarksNotificationsRead()
|
|
{
|
|
var owner = "octokit";
|
|
var repo = "octokit.net";
|
|
|
|
var github = Helper.GetAuthenticatedClient();
|
|
|
|
await github.Activity.Notifications.MarkAsReadForRepository(owner, repo);
|
|
}
|
|
|
|
[IntegrationTest]
|
|
public async Task MarksNotificationsReadForRepositoryId()
|
|
{
|
|
var repositoryId = 7528679;
|
|
|
|
var github = Helper.GetAuthenticatedClient();
|
|
|
|
await github.Activity.Notifications.MarkAsReadForRepository(repositoryId);
|
|
}
|
|
}
|
|
} |