public static async Task <TResult> ShouldAuthorizeAnonymous <TResult>( this ITestFixture fixture, IRequest <TResult> message) { fixture.Logout(); return(await fixture.App.SendAsync(message)); }
public static async Task ShouldNotAuthorizeAnonymous <TResult>( this ITestFixture fixture, IRequest <TResult> message) { fixture.Logout(); await Should.ThrowAsync <UnauthorizedException>(async() => await fixture.App.SendAsync(message)); }