public void executeOperationTest()
        {
            TCPTransport trans = new TCPTransport(System.Net.IPAddress.Loopback, 11222);
            Codec codec = new Codec();

            ClearOperation target = new ClearOperation(codec, null, 0, null);
            Transport transport = null;
            target.executeOperation(transport);
        }
 public void executeTest()
 {
     Transport trans = new TCPTransport(System.Net.IPAddress.Loopback, 11222);
     Codec codec = new Codec();
     PingOperation target = new PingOperation(codec, 0, trans);
     PingOperation.PingResult expected = PingOperation.PingResult.SUCCESS;
     PingOperation.PingResult actual;
     actual = target.execute();
     Assert.AreEqual(expected, actual);
 }
        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);
        }
        public void executeOperationTest()
        {
            TCPTransport trans = new TCPTransport(System.Net.IPAddress.Loopback, 11222);
            Codec codec = new Codec();
            byte[] key = UTF8Encoding.UTF8.GetBytes("key10");

            GetWithVersionOperation target = new GetWithVersionOperation(codec, key, null, 0, null);
            Transport transport = trans;
            BinaryVersionedValue expected = null;
            BinaryVersionedValue actual;
            actual = target.executeOperation(transport);
            Assert.AreEqual(expected, actual.Ver1);
        }
 public void executeOperationTest()
 {
     TCPTransport trans = new TCPTransport(System.Net.IPAddress.Loopback, 11222);
     Codec codec = new Codec();
     byte[] cacheName = null;
     int topologyId = 0;
     Flag[] flags = null;
     StatsOperation target = new StatsOperation(codec, cacheName, topologyId, flags);
     Transport transport = trans;
     string expected = "";
     Dictionary<string, string> actual;
     actual = target.executeOperation(transport);
     Assert.AreEqual(expected, actual[ServerStatistics.CURRENT_NR_OF_ENTRIES]);
 }
        public void executeOperationTest()
        {
            TCPTransport trans = new TCPTransport(System.Net.IPAddress.Loopback, 11222);
            Codec codec = new Codec();
            Serializer s = new DefaultSerializer();

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

            RemoveOperation target = new RemoveOperation(codec, key, null, 0, null);
            Transport transport = trans;
            byte[] expected = null;
            byte[] actual;
            actual = target.executeOperation(transport);
            Assert.AreEqual(expected, actual);
        }
        public void executeOperationTest()
        {
            Transport trans = new TCPTransport(System.Net.IPAddress.Loopback, 11222);
            Codec codec = new Codec();
            Serializer s = new DefaultSerializer();
            Serializer s2 = new DefaultSerializer();

            //byte[] key = s.serialize("11");
            byte[] key = s.serialize("key15");
            //byte[] key=UTF8Encoding.UTF8.GetBytes("key10");
            byte[] val = s.serialize("hexachlorocyclohexane777");//UTF8Encoding.UTF8.GetBytes("hexachlorocyclohexane777");
            PutOperation target = new PutOperation(codec, key, null, 0, null, val, 0, 0); // TODO: Initialize to an appropriate value
            Transport transport = trans;

            byte[] expected = null; // TODO: Initialize to an appropriate value
            byte[] actual;
            actual = target.executeOperation(transport);
            Assert.AreEqual(expected, actual);
        }
        public void executeOperationTest()
        {
            TCPTransport trans = new TCPTransport(System.Net.IPAddress.Loopback, 11222);
            Codec codec = new Codec();
            Serializer s = new DefaultSerializer();

            // byte[] key = s.serialize("11");

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

            GetOperation target = new GetOperation(codec, key, null, 0, null);
            Transport transport = trans;
            string expected = "hexachlorocyclohexane 777";
            byte[] actual;
            actual = target.executeOperation(transport);
            string res = (string)(s.deserialize(actual));

            Assert.AreEqual(expected, res);
        }
        public void executeOperationTest()
        {
            TCPTransport trans = new TCPTransport(System.Net.IPAddress.Loopback, 11222);
            Codec codec = new Codec();
            Serializer s = new DefaultSerializer();
            byte[] key = s.serialize("key10");
            byte[] value = s.serialize("trinitrotoluene");

            byte[] cacheName = null;
            int topologyId = 0;
            Flag[] flags = null;

            int lifespan = 0;
            int maxIdle = 0;
            ReplaceOperation target = new ReplaceOperation(codec, key, cacheName, topologyId, flags, value, lifespan, maxIdle);
            Transport transport = trans;
            byte[] expected = null;
            byte[] actual;
            actual = target.executeOperation(transport);
            Assert.AreEqual(expected, actual);
        }