Author: atsushi
Date: 2007-02-20 19:48:55 -0500 (Tue, 20 Feb 2007)
New Revision: 73225
Modified:
trunk/olive/class/System.IdentityModel/System.IdentityModel.Selectors/ChangeLog
trunk/olive/class/System.IdentityModel/System.IdentityModel.Selectors/SecurityTokenResolver.cs
trunk/olive/class/System.IdentityModel/Test/System.IdentityModel.Selectors/ChangeLog
trunk/olive/class/System.IdentityModel/Test/System.IdentityModel.Selectors/SecurityTokenResolverTest.cs
Log:
2007-02-21 Atsushi Enomoto <[EMAIL PROTECTED]>
* SecurityTokenResolver.cs : fixed some error messages.
* SecurityTokenResolverTest.cs : test for ResolveToken() which cannot
resolve the token.
Modified:
trunk/olive/class/System.IdentityModel/System.IdentityModel.Selectors/ChangeLog
===================================================================
---
trunk/olive/class/System.IdentityModel/System.IdentityModel.Selectors/ChangeLog
2007-02-20 23:24:29 UTC (rev 73224)
+++
trunk/olive/class/System.IdentityModel/System.IdentityModel.Selectors/ChangeLog
2007-02-21 00:48:55 UTC (rev 73225)
@@ -1,3 +1,7 @@
+2007-02-21 Atsushi Enomoto <[EMAIL PROTECTED]>
+
+ * SecurityTokenResolver.cs : fixed some error messages.
+
2007-02-15 Atsushi Enomoto <[EMAIL PROTECTED]>
* X509SecurityTokenAuthenticator.cs : message formatting fix.
Modified:
trunk/olive/class/System.IdentityModel/System.IdentityModel.Selectors/SecurityTokenResolver.cs
===================================================================
---
trunk/olive/class/System.IdentityModel/System.IdentityModel.Selectors/SecurityTokenResolver.cs
2007-02-20 23:24:29 UTC (rev 73224)
+++
trunk/olive/class/System.IdentityModel/System.IdentityModel.Selectors/SecurityTokenResolver.cs
2007-02-21 00:48:55 UTC (rev 73225)
@@ -48,10 +48,10 @@
SecurityKeyIdentifierClause keyIdentifierClause)
{
if (keyIdentifierClause == null)
- throw new ArgumentNullException
("keyIdentifierClause ");
+ throw new ArgumentNullException
("keyIdentifierClause");
SecurityKey ret;
if (!TryResolveSecurityKey (keyIdentifierClause, out
ret))
- throw new InvalidOperationException
(String.Format ("Could not resolve security key with the key identifier '{0}'",
keyIdentifierClause));
+ throw new InvalidOperationException
(String.Format ("Could not resolve security key with the key identifier clause
'{0}'", keyIdentifierClause));
return ret;
}
@@ -59,10 +59,10 @@
SecurityKeyIdentifier keyIdentifier)
{
if (keyIdentifier == null)
- throw new ArgumentNullException
("keyIdentifierClause ");
+ throw new ArgumentNullException
("keyIdentifierClause");
SecurityToken ret;
if (!TryResolveToken (keyIdentifier, out ret))
- throw new InvalidOperationException ("Could not
resolve security token");
+ throw new InvalidOperationException
(String.Format ("Could not resolve security token from the key identifier
'{0}'", keyIdentifier));
return ret;
}
@@ -70,10 +70,10 @@
SecurityKeyIdentifierClause keyIdentifierClause)
{
if (keyIdentifierClause == null)
- throw new ArgumentNullException
("keyIdentifierClause ");
+ throw new ArgumentNullException
("keyIdentifierClause");
SecurityToken ret;
if (!TryResolveToken (keyIdentifierClause, out ret))
- throw new InvalidOperationException
(String.Format ("Could not resolve security token with the key identifier
'{0}'", keyIdentifierClause));
+ throw new InvalidOperationException
(String.Format ("Could not resolve security token from the key identifier
clause '{0}'", keyIdentifierClause));
return ret;
}
Modified:
trunk/olive/class/System.IdentityModel/Test/System.IdentityModel.Selectors/ChangeLog
===================================================================
---
trunk/olive/class/System.IdentityModel/Test/System.IdentityModel.Selectors/ChangeLog
2007-02-20 23:24:29 UTC (rev 73224)
+++
trunk/olive/class/System.IdentityModel/Test/System.IdentityModel.Selectors/ChangeLog
2007-02-21 00:48:55 UTC (rev 73225)
@@ -1,3 +1,8 @@
+2007-02-21 Atsushi Enomoto <[EMAIL PROTECTED]>
+
+ * SecurityTokenResolverTest.cs : test for ResolveToken() which cannot
+ resolve the token.
+
2006-09-27 Atsushi Enomoto <[EMAIL PROTECTED]>
* SecurityTokenResolverTest.cs : new test.
Modified:
trunk/olive/class/System.IdentityModel/Test/System.IdentityModel.Selectors/SecurityTokenResolverTest.cs
===================================================================
---
trunk/olive/class/System.IdentityModel/Test/System.IdentityModel.Selectors/SecurityTokenResolverTest.cs
2007-02-20 23:24:29 UTC (rev 73224)
+++
trunk/olive/class/System.IdentityModel/Test/System.IdentityModel.Selectors/SecurityTokenResolverTest.cs
2007-02-21 00:48:55 UTC (rev 73225)
@@ -47,7 +47,7 @@
{
SecurityTokenResolver r = GetResolver (true, new
SecurityToken [0]);
SecurityToken token;
- Assert.IsFalse (r.TryResolveToken
((SecurityKeyIdentifierClause) null, out token));
+ r.TryResolveToken ((SecurityKeyIdentifierClause) null,
out token);
}
[Test]
@@ -68,5 +68,14 @@
r = GetResolver (false, new SecurityToken []
{userName});
Assert.IsFalse (r.TryResolveToken (kic, out token));
}
+
+ [Test]
+ [ExpectedException (typeof (InvalidOperationException))]
+ public void ResolveTokenNonExistent ()
+ {
+ SecurityTokenResolver r = GetResolver (true, new
SecurityToken [0]);
+ SecurityToken token;
+ Assert.IsNull (r.ResolveToken (new
LocalIdKeyIdentifierClause ("urn:foo")));
+ }
}
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches