public override void SetUp() { base.SetUp(); this.protocol = Protocol.Default; this.responseMessage = new NegativeAssertionResponse(this.protocol.Version, RPUri, this.protocol.Args.Mode.cancel); this.responseMessage.ExtraData[AuthenticationRequest.UserSuppliedIdentifierParameterName] = UserSuppliedIdentifier; this.response = new NegativeAuthenticationResponse(this.responseMessage); }
public override void SetUp() { base.SetUp(); this.protocol = Protocol.Default; this.responseMessage = new NegativeAssertionResponse(this.protocol.Version, RPUri, this.protocol.Args.Mode.cancel); this.responseMessage.ExtraData[AuthenticationRequest.UserSuppliedIdentifierParameterName] = UserSuppliedIdentifier; this.response = new NegativeAuthenticationResponse(this.responseMessage); }
public void ImmediateVsSetupModes() { this.responseMessage = new NegativeAssertionResponse(this.protocol.Version, RPUri, this.protocol.Args.Mode.cancel); this.response = new NegativeAuthenticationResponse(this.responseMessage); Assert.AreEqual(AuthenticationStatus.Canceled, this.response.Status); try { Assert.AreEqual(UserSuppliedIdentifier, this.response.UserSuppliedIdentifier); Assert.Fail("Expected InvalidOperationException not thrown."); } catch (InvalidOperationException) { } this.responseMessage = new NegativeAssertionResponse(this.protocol.Version, RPUri, this.protocol.Args.Mode.setup_needed); this.responseMessage.ExtraData[AuthenticationRequest.UserSuppliedIdentifierParameterName] = UserSuppliedIdentifier; this.response = new NegativeAuthenticationResponse(this.responseMessage); Assert.AreEqual(AuthenticationStatus.SetupRequired, this.response.Status); Assert.AreEqual(UserSuppliedIdentifier, (string)this.response.UserSuppliedIdentifier); }
public void ImmediateVsSetupModes() { this.responseMessage = new NegativeAssertionResponse(this.protocol.Version, RPUri, this.protocol.Args.Mode.cancel); this.response = new NegativeAuthenticationResponse(this.responseMessage); Assert.AreEqual(AuthenticationStatus.Canceled, this.response.Status); try { Assert.AreEqual(UserSuppliedIdentifier, this.response.UserSuppliedIdentifier); Assert.Fail("Expected InvalidOperationException not thrown."); } catch (InvalidOperationException) { } this.responseMessage = new NegativeAssertionResponse(this.protocol.Version, RPUri, this.protocol.Args.Mode.setup_needed); this.responseMessage.ExtraData[AuthenticationRequest.UserSuppliedIdentifierParameterName] = UserSuppliedIdentifier; this.response = new NegativeAuthenticationResponse(this.responseMessage); Assert.AreEqual(AuthenticationStatus.SetupRequired, this.response.Status); Assert.AreEqual(UserSuppliedIdentifier, (string)this.response.UserSuppliedIdentifier); }