コード例 #1
0
        public void executeOperationTest()
        {
            TCPTransport trans = new TCPTransport(System.Net.IPAddress.Loopback, 11222);
            Codec codec = new Codec();
            byte[] key = UTF8Encoding.UTF8.GetBytes("key10");

            ContainsKeyOperation target = new ContainsKeyOperation(codec, key, null, 0, null);
            Transport transport = trans;
            bool expected = false;
            bool actual;
            actual = target.executeOperation(transport);
            Assert.AreEqual(expected, actual);
        }
コード例 #2
0
        /// <summary>
        /// Checks whether the passes key exists in the cache
        /// </summary>
        /// <param name="key">Key</param>
        /// <returns>True if the passed key exixts. False if not exist.</returns>
        public bool containsKey(Object key)
        {
            ContainsKeyOperation op = operationsFactory.newContainsKeyOperation(serializer.serialize(key));

            transport = transportFactory.getTransport();
            try
            {
            }
            finally
            {
                transportFactory.releaseTransport(transport);
            }
            return((Boolean)op.executeOperation(transport));
        }
コード例 #3
0
        public void executeOperationTest()
        {
            TCPTransport trans = new TCPTransport(System.Net.IPAddress.Loopback, 11222);
            Codec        codec = new Codec();

            byte[] key = UTF8Encoding.UTF8.GetBytes("key10");

            ContainsKeyOperation target    = new ContainsKeyOperation(codec, key, null, 0, null);
            Transport            transport = trans;
            bool expected = false;
            bool actual;

            actual = target.executeOperation(transport);
            Assert.AreEqual(expected, actual);
        }