public async Task Unauthenticated() { var request = new RequestContextImpl(); request.GetOrAddPayload(() => System.Threading.Thread.CurrentPrincipal); await _thePipe.Send(request).ConfigureAwait(false); Assert.That(protectedBusinessAction, Is.False); Assert.That(cleanUp, Is.True); Assert.That(rejected, Is.True); }
public async Task Authenticated() { var request = new RequestContextImpl(); request.GetOrAddPayload(() => new GenericPrincipal(new GenericIdentity("Gizmo"), new [] { "bob" })); await _thePipe.Send(request).ConfigureAwait(false); Assert.That(protectedBusinessAction, Is.True); Assert.That(cleanUp, Is.True); Assert.That(rejected, Is.False); }