protected Identifier GetMockDualIdentifier() { Protocol protocol = Protocol.Default; var opDesc = new ProviderEndpointDescription(OPUri, protocol.Version); var dualResults = new IdentifierDiscoveryResult[] { IdentifierDiscoveryResult.CreateForClaimedIdentifier(VanityUri.AbsoluteUri, OPLocalIdentifiers[0], opDesc, 10, 10), IdentifierDiscoveryResult.CreateForProviderIdentifier(protocol.ClaimedIdentifierForOPIdentifier, opDesc, 20, 20), }; this.RegisterMockXrdsResponse(VanityUri, dualResults); return(VanityUri); }
public void IsExtensionSupported() { var se = IdentifierDiscoveryResult.CreateForProviderIdentifier(OPUri, new ProviderEndpointDescription(OPUri, this.v20TypeUris), null, null); Assert.IsFalse(se.IsExtensionSupported <ClaimsRequest>()); Assert.IsFalse(se.IsExtensionSupported(new ClaimsRequest())); Assert.IsFalse(se.IsTypeUriPresent("http://someextension/typeuri")); se = IdentifierDiscoveryResult.CreateForProviderIdentifier( OPUri, new ProviderEndpointDescription(OPUri, new[] { Protocol.V20.ClaimedIdentifierServiceTypeURI, "http://someextension", Constants.sreg_ns }), null, null); Assert.IsTrue(se.IsExtensionSupported <ClaimsRequest>()); Assert.IsTrue(se.IsExtensionSupported(new ClaimsRequest())); Assert.IsTrue(se.IsTypeUriPresent("http://someextension")); }
public void IsExtensionSupportedNullExtension() { var se = IdentifierDiscoveryResult.CreateForProviderIdentifier(OPUri, new ProviderEndpointDescription(OPUri, this.v20TypeUris), null, null); se.IsExtensionSupported((IOpenIdMessageExtension)null); }
public void IsTypeUriPresentEmptyString() { var se = IdentifierDiscoveryResult.CreateForProviderIdentifier(OPUri, new ProviderEndpointDescription(OPUri, this.v20TypeUris), null, null); se.IsTypeUriPresent(string.Empty); }