public void PendingAuthnInMemoryStorage_Add_ThrowsOnExisting()
 {
     var id = new Saml2Id();
     var requestData = new StoredRequestState(new EntityId("testidp"), new Uri("http://localhost/Return.aspx"));
     var container = new PendingAuthnInMemoryStorage();
     container.Add(id, requestData);
     Action a = () => container.Add(id, requestData);
     a.ShouldThrow<InvalidOperationException>();
 }
 public void PendingAuthnInMemoryStorage_Remove_FalseOnRemovedTwice()
 {
     var id = new Saml2Id();
     var requestData = new StoredRequestState(new EntityId("testidp"), new Uri("http://localhost/Return.aspx"));
     StoredRequestState responseData;
     var container = new PendingAuthnInMemoryStorage();
     container.Add(id, requestData);
     container.TryRemove(id, out responseData).Should().BeTrue();
     container.TryRemove(id, out responseData).Should().BeFalse();
 }