예제 #1
0
        public static async Task <TResult> ShouldAuthorizeAnonymous <TResult>(
            this ITestFixture fixture,
            IRequest <TResult> message)
        {
            fixture.Logout();

            return(await fixture.App.SendAsync(message));
        }
예제 #2
0
        public static async Task ShouldNotAuthorizeAnonymous <TResult>(
            this ITestFixture fixture,
            IRequest <TResult> message)
        {
            fixture.Logout();

            await Should.ThrowAsync <UnauthorizedException>(async() => await fixture.App.SendAsync(message));
        }