@@ -67,22 +67,23 @@ public async Task NoAssociationNegative() {
6767 [ Test ]
6868 public async Task UnsolicitedAssertion ( ) {
6969 var opStore = new StandardProviderApplicationStore ( ) ;
70- Handle ( RPRealmUri ) . By (
70+ Handle ( RPUri ) . By (
7171 async req => {
7272 var rp = new OpenIdRelyingParty ( new StandardRelyingPartyApplicationStore ( ) , this . HostFactories ) ;
73- IAuthenticationResponse response = await rp . GetResponseAsync ( ) ;
73+ IAuthenticationResponse response = await rp . GetResponseAsync ( req ) ;
74+ Assert . That ( response , Is . Not . Null ) ;
7475 Assert . AreEqual ( AuthenticationStatus . Authenticated , response . Status ) ;
7576 return new HttpResponseMessage ( ) ;
7677 } ) ;
7778 Handle ( OPUri ) . By (
7879 async ( req , ct ) => {
79- var op = new OpenIdProvider ( opStore ) ;
80+ var op = new OpenIdProvider ( opStore , this . HostFactories ) ;
8081 return await this . AutoProviderActionAsync ( op , req , ct ) ;
8182 } ) ;
8283 this . RegisterMockRPDiscovery ( ssl : false ) ;
8384
8485 {
85- var op = new OpenIdProvider ( opStore ) ;
86+ var op = new OpenIdProvider ( opStore , this . HostFactories ) ;
8687 Identifier id = GetMockIdentifier ( ProtocolVersion . V20 ) ;
8788 var assertion = await op . PrepareUnsolicitedAssertionAsync ( OPUri , RPRealmUri , id , OPLocalIdentifiers [ 0 ] ) ;
8889
@@ -97,23 +98,24 @@ public async Task UnsolicitedAssertion() {
9798 [ Test ]
9899 public async Task UnsolicitedAssertionRejected ( ) {
99100 var opStore = new StandardProviderApplicationStore ( ) ;
100- Handle ( RPRealmUri ) . By (
101+ Handle ( RPUri ) . By (
101102 async req => {
102103 var rp = new OpenIdRelyingParty ( new StandardRelyingPartyApplicationStore ( ) , this . HostFactories ) ;
103104 rp . SecuritySettings . RejectUnsolicitedAssertions = true ;
104105 IAuthenticationResponse response = await rp . GetResponseAsync ( req ) ;
106+ Assert . That ( response , Is . Not . Null ) ;
105107 Assert . AreEqual ( AuthenticationStatus . Failed , response . Status ) ;
106108 return new HttpResponseMessage ( ) ;
107109 } ) ;
108110 Handle ( OPUri ) . By (
109111 async req => {
110- var op = new OpenIdProvider ( opStore ) ;
112+ var op = new OpenIdProvider ( opStore , this . HostFactories ) ;
111113 return await this . AutoProviderActionAsync ( op , req , CancellationToken . None ) ;
112114 } ) ;
113115 this . RegisterMockRPDiscovery ( ssl : false ) ;
114116
115117 {
116- var op = new OpenIdProvider ( opStore ) ;
118+ var op = new OpenIdProvider ( opStore , this . HostFactories ) ;
117119 Identifier id = GetMockIdentifier ( ProtocolVersion . V20 ) ;
118120 var assertion = await op . PrepareUnsolicitedAssertionAsync ( OPUri , RPRealmUri , id , OPLocalIdentifiers [ 0 ] ) ;
119121 using ( var httpClient = this . HostFactories . CreateHttpClient ( ) ) {
@@ -131,11 +133,12 @@ public async Task UnsolicitedAssertionRejected() {
131133 [ Test ]
132134 public async Task UnsolicitedDelegatingIdentifierRejection ( ) {
133135 var opStore = new StandardProviderApplicationStore ( ) ;
134- Handle ( RPRealmUri ) . By (
136+ Handle ( RPUri ) . By (
135137 async req => {
136138 var rp = this . CreateRelyingParty ( ) ;
137139 rp . SecuritySettings . RejectDelegatingIdentifiers = true ;
138140 IAuthenticationResponse response = await rp . GetResponseAsync ( req ) ;
141+ Assert . That ( response , Is . Not . Null ) ;
139142 Assert . AreEqual ( AuthenticationStatus . Failed , response . Status ) ;
140143 return new HttpResponseMessage ( ) ;
141144 } ) ;
@@ -147,7 +150,7 @@ public async Task UnsolicitedDelegatingIdentifierRejection() {
147150 this . RegisterMockRPDiscovery ( ssl : false ) ;
148151
149152 {
150- var op = new OpenIdProvider ( opStore ) ;
153+ var op = new OpenIdProvider ( opStore , this . HostFactories ) ;
151154 Identifier id = GetMockIdentifier ( ProtocolVersion . V20 , false , true ) ;
152155 var assertion = await op . PrepareUnsolicitedAssertionAsync ( OPUri , RPRealmUri , id , OPLocalIdentifiers [ 0 ] ) ;
153156 using ( var httpClient = this . HostFactories . CreateHttpClient ( ) ) {
0 commit comments