public void GetTokenTest() { var key = new Uri("http://www.contoso.com/"); SecurityToken actual = TokenCacheHelper.GetToken(key); Assert.IsNull(actual); }
public void AddTokenTest() { var key = new Uri("http://www.tokencache.com/"); SecurityToken token = new SamlSecurityToken(new SamlAssertion()); TokenCacheHelper.AddToken(key, token); var t = TokenCacheHelper.GetToken(key); Assert.AreEqual(token, t); TokenCacheHelper.AddToken(key, token); t = TokenCacheHelper.GetToken(key); Assert.AreEqual(token, t); }