diff options
Diffstat (limited to 'src/DotNetOpenId.Test/UriIdentifierTests.cs')
-rw-r--r-- | src/DotNetOpenId.Test/UriIdentifierTests.cs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/DotNetOpenId.Test/UriIdentifierTests.cs b/src/DotNetOpenId.Test/UriIdentifierTests.cs index c8fcf6a..cd42d48 100644 --- a/src/DotNetOpenId.Test/UriIdentifierTests.cs +++ b/src/DotNetOpenId.Test/UriIdentifierTests.cs @@ -13,6 +13,12 @@ namespace DotNetOpenId.Test { string relativeUri = "host/path";
string badUri = "som%-)830w8vf/?.<>,ewackedURI";
+ [SetUp]
+ public void SetUp() {
+ if (!UntrustedWebRequest.WhitelistHosts.Contains("localhost"))
+ UntrustedWebRequest.WhitelistHosts.Add("localhost");
+ }
+
[Test, ExpectedException(typeof(ArgumentNullException))]
public void CtorNullUri() {
new UriIdentifier((Uri)null);
@@ -84,8 +90,7 @@ namespace DotNetOpenId.Test { Assert.AreEqual(expectedLocalId, se.ProviderLocalIdentifier);
Assert.AreEqual(expectSreg ? 2 : 1, se.ProviderSupportedServiceTypeUris.Length);
Assert.IsTrue(Array.IndexOf(se.ProviderSupportedServiceTypeUris, protocol.ClaimedIdentifierServiceTypeURI)>=0);
- if (expectSreg)
- Assert.IsTrue(Array.IndexOf(se.ProviderSupportedServiceTypeUris, Constants.TypeUri) >= 0);
+ Assert.AreEqual(expectSreg, se.IsExtensionSupported(new ClaimsRequest()));
}
void discoverXrds(string page, ProtocolVersion version, Identifier expectedLocalId) {
discover("/xrdsdiscovery/" + page + ".aspx", version, expectedLocalId, true, false);
|