mirror of
https://github.com/zoriya/octokit.net.git
synced 2025-12-23 23:55:13 +00:00
31 lines
755 B
C#
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);
|
|
}
|
|
}
|
|
}
|
|
}
|