public async Task AuthenticateReturnsNull_InvokesNext()
        {
            await middleware.Invoke(contextMock.Object);

            nextMock.Verify(m => m.Invoke(contextMock.Object), Times.Once);
        }
Exemple #2
0
        public async Task Authentication_NoAuthenticationHeader_ShouldReturn401()
        {
            await _middleware.Invoke(_context, _userServiceMock.Object);

            Assert.Equal(401, _context.Response.StatusCode);
        }