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); }
public void TestAdd_Get_SimpleType_Success() { ServerCache.Add(key, () => "result"); Assert.AreEqual("result", ServerCache.Get <string>(key)); }