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

            return(await fixture.App.SendAsync(message));
        }
Esempio n. 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));
        }