예제 #1
0
        public async Task MultiSetAndGet()
        {
            MyCacheClient client = new MyCacheClient();

            await client.Connect();

            ResponseStatus status = await client.Set("1", "One");

            Assert.AreEqual(ResponseStatus.NoError, status);

            status = await client.Set("2", "Two");

            Assert.AreEqual(ResponseStatus.NoError, status);

            status = await client.Set("3", "Three");

            Assert.AreEqual(ResponseStatus.NoError, status);

            String value = await client.Get("1");

            Assert.AreEqual("One", value);

            value = await client.Get("2");

            Assert.AreEqual("Two", value);

            value = await client.Get("3");

            Assert.AreEqual("Three", value);
        }
예제 #2
0
        public async Task SimpleSetAndGet()
        {
            MyCacheClient client = new MyCacheClient();

            await client.Connect();

            ResponseStatus status = await client.Set("Hello", "World");

            Assert.AreEqual(ResponseStatus.NoError, status);

            String value = await client.Get("Hello");

            Assert.AreEqual("World", value);
        }