Files
octokit.net/Octokit.Tests/Exceptions/TwoFactorRequiredExceptionTests.cs
2015-01-04 18:58:53 -08:00

31 lines
755 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using Octokit.Internal;
using Xunit;
namespace Octokit.Tests.Exceptions
{
public class TwoFactorRequiredExceptionTests
{
public class TheConstructor
{
[Fact]
public void SetsDefaultMessage()
{
var response = new Response
{
StatusCode = HttpStatusCode.Unauthorized
};
var exception = new TwoFactorRequiredException(response, TwoFactorType.Sms);
Assert.Equal("Two-factor authentication code is required", exception.Message);
}
}
}
}