mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-06 20:13:40 +00:00
rewrite the setup of responses to use a standard helper function (#2177)
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using Octokit.Internal;
|
||||
using System.Net;
|
||||
using Xunit;
|
||||
|
||||
using static Octokit.Internal.TestSetup;
|
||||
|
||||
namespace Octokit.Tests.Exceptions
|
||||
{
|
||||
public class LegalRestrictionExceptionTests
|
||||
@@ -10,10 +10,10 @@ namespace Octokit.Tests.Exceptions
|
||||
[Fact]
|
||||
public void HasDefaultMessage()
|
||||
{
|
||||
var response = new Response((HttpStatusCode)451, null, new Dictionary<string, string>(), "application/json");
|
||||
var response = CreateResponse((HttpStatusCode)451);
|
||||
var legalRestrictionException = new LegalRestrictionException(response);
|
||||
|
||||
Assert.Equal("Resource taken down due to a DMCA notice.", legalRestrictionException.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user