これが重複した質問である場合はお詫び申し上げます(そのようなものは見つかりませんでした)。OpenId認証サービスを構築して単体テストしようとしていますが、現在、次の設定があります。
public class OpenIdAuthenticationService : IAuthenticationService
{
private IConfigurationService _configService;
private OpenIdRelyingParty _openIdRelyingParty;
public OpenIdAuthenticationService(IConfigurationService configService)
{
_configService = configService;
_openIdRelyingParty = new OpenIdRelyingParty();
}
}
どうやらOpenIdRelyingPartyはHttpContextへのアクセスを必要としますが、OpenIdRelyingPartyをモックしてサービスを注入する方法はありますか?または、HttpContextをモックして、なんとかしてOpenIdRelyingPartyに提供しますか?