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 }
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 }
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 }
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"); }
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"); }
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");; }