summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/DotNetOpenAuth.Test/DotNetOpenAuth.Test.csproj3
-rw-r--r--src/DotNetOpenAuth.Test/OpenId/Extensions/ExtensionsInteropHelperRPRequestTests.cs7
-rw-r--r--src/DotNetOpenAuth/OpenId/RelyingParty/ServiceEndpoint.cs9
3 files changed, 11 insertions, 8 deletions
diff --git a/src/DotNetOpenAuth.Test/DotNetOpenAuth.Test.csproj b/src/DotNetOpenAuth.Test/DotNetOpenAuth.Test.csproj
index ceeb6a6..17f33ff 100644
--- a/src/DotNetOpenAuth.Test/DotNetOpenAuth.Test.csproj
+++ b/src/DotNetOpenAuth.Test/DotNetOpenAuth.Test.csproj
@@ -312,9 +312,6 @@
<EmbeddedResource Include="Logging.config" />
</ItemGroup>
<ItemGroup>
- <Shadow Include="Test References\DotNetOpenAuth.accessor" />
- </ItemGroup>
- <ItemGroup>
<EmbeddedResource Include="OpenId\Discovery\htmldiscovery\html1020.html" />
<EmbeddedResource Include="OpenId\Discovery\htmldiscovery\html10both.html" />
<EmbeddedResource Include="OpenId\Discovery\htmldiscovery\html10del.html" />
diff --git a/src/DotNetOpenAuth.Test/OpenId/Extensions/ExtensionsInteropHelperRPRequestTests.cs b/src/DotNetOpenAuth.Test/OpenId/Extensions/ExtensionsInteropHelperRPRequestTests.cs
index 96aaab7..b691697 100644
--- a/src/DotNetOpenAuth.Test/OpenId/Extensions/ExtensionsInteropHelperRPRequestTests.cs
+++ b/src/DotNetOpenAuth.Test/OpenId/Extensions/ExtensionsInteropHelperRPRequestTests.cs
@@ -118,11 +118,8 @@ namespace DotNetOpenAuth.Test.OpenId.Extensions {
/// </summary>
/// <param name="typeUri">The type URI.</param>
private void InjectAdvertisedTypeUri(string typeUri) {
- var serviceEndpoint = ServiceEndpoint_Accessor.AttachShadow(((ServiceEndpoint)this.authReq.Provider));
- serviceEndpoint.ProviderDescription = ProviderEndpointDescription_Accessor.AttachShadow(
- new ProviderEndpointDescription(
- serviceEndpoint.ProviderDescription.Endpoint,
- serviceEndpoint.ProviderDescription.Capabilities.Concat(new[] { typeUri })));
+ var serviceEndpoint = (ServiceEndpoint)this.authReq.Provider;
+ serviceEndpoint.SetCapabilitiesForTestHook(serviceEndpoint.ProviderDescription.Capabilities.Concat(new[] { typeUri }));
}
}
}
diff --git a/src/DotNetOpenAuth/OpenId/RelyingParty/ServiceEndpoint.cs b/src/DotNetOpenAuth/OpenId/RelyingParty/ServiceEndpoint.cs
index f8744d0..695ca85 100644
--- a/src/DotNetOpenAuth/OpenId/RelyingParty/ServiceEndpoint.cs
+++ b/src/DotNetOpenAuth/OpenId/RelyingParty/ServiceEndpoint.cs
@@ -6,6 +6,7 @@
namespace DotNetOpenAuth.OpenId.RelyingParty {
using System;
+ using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Diagnostics.Contracts;
@@ -490,6 +491,14 @@ namespace DotNetOpenAuth.OpenId.RelyingParty {
}
/// <summary>
+ /// Sets a specific set of type URIs on the discovered endpoint for testing purposes.
+ /// </summary>
+ /// <param name="capabilities">The set of capabilities to set on the endpoint.</param>
+ internal void SetCapabilitiesForTestHook(IEnumerable<string> capabilities) {
+ this.ProviderDescription = new ProviderEndpointDescription(this.ProviderDescription.Endpoint, capabilities);
+ }
+
+ /// <summary>
/// Gets the priority rating for a given type of endpoint, allowing a
/// priority sorting of endpoints.
/// </summary>