Exemple #1
0
        public void TestAdd_Get_Class_Success()
        {
            var tokenID = Guid.NewGuid();

            ServerCache.Add(key, () => new UserDataCollection {
                new UserData {
                    TokenID = tokenID
                }
            });

            var result = ServerCache.Get <UserDataCollection>(key);

            Assert.AreEqual(1, result.Count);
            Assert.AreEqual(tokenID, result[0].TokenID);
        }
Exemple #2
0
        public void TestAdd_Get_SimpleType_Success()
        {
            ServerCache.Add(key, () => "result");

            Assert.AreEqual("result", ServerCache.Get <string>(key));
        }