Exemplo n.º 1
0
        public void TestMove()
        {
            using (NativeRunner runner = new NativeRunner(HOST, PORT))
            {
                runner.PutBlob("blob", new byte[0]);
                Assert.IsTrue(runner.HasBlob("blob"));

                runner.MoveBlob2Blob("blob", "blob2");
                Assert.IsTrue(runner.HasBlob("blob2"));
                Assert.IsFalse(runner.HasBlob("blob"));

                runner.MoveBlob2File("blob2", "file");
                Assert.IsFalse(runner.HasBlob("blob2"));
                Assert.IsTrue(runner.HasFile("file"));

                runner.MoveFile2File("file", "file2");
                Assert.IsTrue(runner.HasFile("file2"));
                Assert.IsFalse(runner.HasFile("file"));

                runner.MoveFile2Blob("file2", "blob3");
                Assert.IsTrue(runner.HasBlob("blob3"));
                Assert.IsFalse(runner.HasFile("file2"));
            }
        }