rewrite the setup of responses to use a standard helper function (#2177)

This commit is contained in:
Brendan Forster
2020-04-14 11:30:15 -03:00
committed by GitHub
parent 69d118230d
commit 287861e4a7
41 changed files with 390 additions and 448 deletions
@@ -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);
}
}
}
}