Exemple #1
0
        public void GetMissingValueTest()
        {
            string    projectId = this.projectId;
            string    token     = this.token;
            IronCache target    = new IronCache(projectId, token);

            string key   = "this is an arbitrary key";
            string cache = "test_cache";

            target.Remove(cache, key);
            var actual = target.Get <string>(cache, key);

            Assert.IsNull(actual);
        }
Exemple #2
0
        public void AddGetTest()
        {
            string    projectId = this.projectId;
            string    token     = this.token;
            IronCache target    = new IronCache(projectId, token);

            string value = "this is some arbitrary text";
            string key   = "this is an arbitrary key";
            string cache = "test_cache";

            target.Put(cache, key, value);
            var actual = target.Get <string>(cache, key);

            Assert.IsNotNull(actual);
            Assert.AreEqual(value, actual);
        }
        public void AddGetIntTest()
        {
            string projectId = _projectId;
            string token = _token;
            IronCache target = new IronCache(projectId, token);

            int value = 10;
            string key = "this is an arbitrary key";
            string cache = "test_cache";

            target.Put(cache, key, value);
            var actual = target.Get<int?>(cache, key);

            Assert.IsNotNull(actual);
            Assert.AreEqual(value, actual);
        }
Exemple #4
0
        public void AddGetTest()
        {
            string projectId = this.projectId;
            string token = this.token;
            IronCache target = new IronCache(projectId, token);

            string value = "this is some arbitrary text";
            string key = "this is an arbitrary key";
            string cache = "test_cache";

            target.Put(cache, key, value);
            var actual = target.Get<string>(cache, key);

            Assert.IsNotNull(actual);
            Assert.AreEqual(value, actual);
        }
Exemple #5
0
        public void GetMissingValueTest()
        {
            string projectId = this.projectId;
            string token = this.token;
            IronCache target = new IronCache(projectId, token);

            string key = "this is an arbitrary key";
            string cache = "test_cache";

            target.Remove(cache, key);
            var actual = target.Get<string>(cache, key);
            Assert.IsNull(actual);
        }