Ejemplo n.º 1
0
        public async Task BatchCopyTest()
#endif
        {
            RSClient target = new RSClient();                      // TODO: 初始化为适当的值

            EntryPathPair[] entryPathPairs = new EntryPathPair[2]; // TODO: 初始化为适当的值
            string          tmpKey         = NewKey;
            string          tmpKey2        = NewKey;

            entryPathPairs[0] = new EntryPathPair(Bucket, tmpKeys[0], tmpKey);
            entryPathPairs[1] = new EntryPathPair(Bucket, tmpKeys[1], tmpKey2);
            CallRet actual;

#if NET20 || NET40
            actual = target.BatchCopy(entryPathPairs);
            if (actual.OK)
            {
                RSHelper.RSDel(Bucket, tmpKey);
                RSHelper.RSDel(Bucket, tmpKey2);
            }
            Assert.IsTrue(actual.OK, "BatchStatTest Failure");
#else
            actual = await target.BatchCopyAsync(entryPathPairs);

            if (actual.OK)
            {
                await RSHelper.RSDel(Bucket, tmpKey);

                await RSHelper.RSDel(Bucket, tmpKey2);
            }
            Assert.True(actual.OK, "BatchStatTest Failure");
#endif
        }
Ejemplo n.º 2
0
        public async Task CopyTest()
#endif
        {
            RSClient      target   = new RSClient();                             // TODO: 初始化为适当的值
            string        key      = NewKey;
            EntryPathPair pathPair = new EntryPathPair(Bucket, tmpKeys[0], key); // TODO: 初始化为适当的值
            CallRet       actual;

#if NET20 || NET40
            actual = target.Copy(pathPair);
            if (actual.OK)
            {
                RSHelper.RSDel(Bucket, key);
            }
            Assert.IsTrue(actual.OK, "CopyTest Failure");
#else
            actual = await target.CopyAsync(pathPair);

            if (actual.OK)
            {
                await RSHelper.RSDel(Bucket, key);
            }
            Assert.True(actual.OK, "CopyTest Failure");
#endif
        }
Ejemplo n.º 3
0
        public async Task MoveTest()
#endif
        {
            RSClient      target   = new RSClient();                              // TODO: 初始化为适当的值
            string        key      = NewKey;
            EntryPathPair pathPair = new EntryPathPair(Bucket, tmpKeys[0], key);; // TODO: 初始化为适当的值
            CallRet       actual;

            //YES
#if NET20 || NET40
            actual = target.Move(pathPair);
            if (actual.OK)
            {
                tmpKeys [0] = key;
            }
            Assert.IsTrue(actual.OK, "MoveTest Failure");
#else
            actual = await target.MoveAsync(pathPair);

            if (actual.OK)
            {
                tmpKeys[0] = key;
            }
            Assert.True(actual.OK, "MoveTest Failure");
#endif
        }
Ejemplo n.º 4
0
        public void CopyTest()
        {
            RSClient      target   = new RSClient();                             // TODO: 初始化为适当的值
            string        key      = NewKey;
            EntryPathPair pathPair = new EntryPathPair(Bucket, tmpKeys[0], key); // TODO: 初始化为适当的值
            CallRet       actual;

            actual = target.Copy(pathPair);
            if (actual.OK)
            {
                RSHelper.RSDel(Bucket, key);
            }
            Assert.IsTrue(actual.OK, "CopyTest Failure");
        }
Ejemplo n.º 5
0
        public void MoveTest()
        {
            RSClient      target   = new RSClient();                              // TODO: 初始化为适当的值
            string        key      = NewKey;
            EntryPathPair pathPair = new EntryPathPair(Bucket, tmpKeys[0], key);; // TODO: 初始化为适当的值
            CallRet       actual;

            //YES
            actual = target.Move(pathPair);
            if (actual.OK)
            {
                tmpKeys [0] = key;
            }
            Assert.IsTrue(actual.OK, "MoveTest Failure");
        }
Ejemplo n.º 6
0
        public void BatchCopyTest()
        {
            RSClient target = new RSClient();                      // TODO: 初始化为适当的值

            EntryPathPair[] entryPathPairs = new EntryPathPair[2]; // TODO: 初始化为适当的值
            string          tmpKey         = NewKey;
            string          tmpKey2        = NewKey;

            entryPathPairs[0] = new EntryPathPair(Bucket, tmpKeys[0], tmpKey);
            entryPathPairs[1] = new EntryPathPair(Bucket, tmpKeys[1], tmpKey2);
            CallRet actual;

            actual = target.BatchCopy(entryPathPairs);
            if (actual.OK)
            {
                RSHelper.RSDel(Bucket, tmpKey);
                RSHelper.RSDel(Bucket, tmpKey2);
            }
            Assert.IsTrue(actual.OK, "BatchStatTest Failure");;
        }