diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2009-07-02 21:55:27 -0700 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2009-07-02 21:55:27 -0700 |
commit | a2ade46df119aceeabebe99a56cc83452aaa0a55 (patch) | |
tree | 2a633607f9098da756fdcec829f3ffbc46d53e16 | |
parent | 5b95845637f2595c70234456019b8f9aeb56af5e (diff) | |
download | DotNetOpenAuth-a2ade46df119aceeabebe99a56cc83452aaa0a55.zip DotNetOpenAuth-a2ade46df119aceeabebe99a56cc83452aaa0a55.tar.gz DotNetOpenAuth-a2ade46df119aceeabebe99a56cc83452aaa0a55.tar.bz2 |
More careful CC changes.
4 files changed, 5 insertions, 5 deletions
diff --git a/src/DotNetOpenAuth.Test/OpenId/ProviderEndpointDescriptionTests.cs b/src/DotNetOpenAuth.Test/OpenId/ProviderEndpointDescriptionTests.cs index 005b8a0..089265f 100644 --- a/src/DotNetOpenAuth.Test/OpenId/ProviderEndpointDescriptionTests.cs +++ b/src/DotNetOpenAuth.Test/OpenId/ProviderEndpointDescriptionTests.cs @@ -29,7 +29,7 @@ namespace DotNetOpenAuth.Test.OpenId { this.se.IsExtensionSupported((Type)null); } - [TestMethod, ExpectedException(typeof(ArgumentNullException))] + [TestMethod, ExpectedException(typeof(ArgumentException))] public void IsExtensionSupportedNullString() { this.se.IsExtensionSupported((string)null); } diff --git a/src/DotNetOpenAuth.Test/OpenId/RelyingParty/ServiceEndpointTests.cs b/src/DotNetOpenAuth.Test/OpenId/RelyingParty/ServiceEndpointTests.cs index bd09bc9..0af234a 100644 --- a/src/DotNetOpenAuth.Test/OpenId/RelyingParty/ServiceEndpointTests.cs +++ b/src/DotNetOpenAuth.Test/OpenId/RelyingParty/ServiceEndpointTests.cs @@ -180,7 +180,7 @@ namespace DotNetOpenAuth.Test.OpenId.RelyingParty { Assert.IsFalse(se.IsTypeUriPresent("http://someother")); } - [TestMethod, ExpectedException(typeof(ArgumentNullException))] + [TestMethod, ExpectedException(typeof(ArgumentException))] public void IsTypeUriPresentNull() { ServiceEndpoint se = ServiceEndpoint.CreateForClaimedIdentifier(this.claimedXri, this.userSuppliedXri, this.localId, new ProviderEndpointDescription(this.providerEndpoint, this.v20TypeUris), this.servicePriority, this.uriPriority); se.IsTypeUriPresent(null); diff --git a/src/DotNetOpenAuth/OpenId/ProviderEndpointDescription.cs b/src/DotNetOpenAuth/OpenId/ProviderEndpointDescription.cs index f7c72fe..5564084 100644 --- a/src/DotNetOpenAuth/OpenId/ProviderEndpointDescription.cs +++ b/src/DotNetOpenAuth/OpenId/ProviderEndpointDescription.cs @@ -147,8 +147,8 @@ namespace DotNetOpenAuth.OpenId { /// <c>true</c> if the extension is supported; otherwise, <c>false</c>. /// </returns> protected internal bool IsExtensionSupported(string extensionUri) { - ErrorUtilities.VerifyNonZeroLength(extensionUri, "extensionUri"); - ErrorUtilities.VerifyOperation(this.Capabilities != null, OpenIdStrings.ExtensionLookupSupportUnavailable); + Contract.Requires<ArgumentException>(!String.IsNullOrEmpty(extensionUri)); + Contract.Requires<InvalidOperationException>(this.Capabilities != null, OpenIdStrings.ExtensionLookupSupportUnavailable); return this.Capabilities.Contains(extensionUri); } diff --git a/src/DotNetOpenAuth/OpenId/XriIdentifier.cs b/src/DotNetOpenAuth/OpenId/XriIdentifier.cs index 39b9952..ec5f6aa 100644 --- a/src/DotNetOpenAuth/OpenId/XriIdentifier.cs +++ b/src/DotNetOpenAuth/OpenId/XriIdentifier.cs @@ -164,7 +164,7 @@ namespace DotNetOpenAuth.OpenId { /// <c>true</c> if the given string constitutes a valid XRI; otherwise, <c>false</c>. /// </returns> internal static bool IsValidXri(string xri) { - Contract.Requires((xri != null && xri.Length > 0) || !string.IsNullOrEmpty(xri)); + Contract.Requires<ArgumentException>(!String.IsNullOrEmpty(xri)); xri = xri.Trim(); // TODO: better validation code here |