Ejemplo n.º 1
0
        public void Create_WhenTokenIssuedFailureEvent_WillReturnTokenIssuedFailureAdapter()
        {
            // Arrange
            var request = new ValidatedAuthorizeRequest()
            {
                Client  = new Client(),
                Subject = new ClaimsPrincipal(new ClaimsIdentity(new List <Claim>()
                {
                    new Claim(JwtClaimTypes.Subject, string.Empty)
                }))
            };

            var evt = new TokenIssuedFailureEvent(request, string.Empty, string.Empty);

            var sut = new AdapterFactory();

            // Act
            var adapter = sut.Create(evt);

            // Assert
            Assert.IsType <TokenIssuedFailureEventAdapter>(adapter);
        }
 public TokenIssuedFailureEventAdapter(TokenIssuedFailureEvent evt)
 {
     this.evt = evt ?? throw new ArgumentNullException(nameof(evt));
 }