Files
octokit.net/Octokit.Tests.Integration/Clients/NotificationsClientTests.cs
Brendan Forster f6154dac9f bugfix - PUT should have a payload for Mark as Read (#1579)
* 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 :)
2017-04-13 18:04:04 +10:00

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);
}
}
}