csharp-sdk-upm/Storage/Storage.Test/FileTest.cs

62 lines
2.1 KiB
C#
Raw Normal View History

using NUnit.Framework;
using LeanCloud;
using System.IO;
* csharp-sdk.sln: chore: 重构 AVFile 为 AVObject 的子类 * RTM.csproj: * AVQuery2.cs: * AVRealtime.cs: * AVIMNotice.cs: * AVIMClient.cs: * AVIMMessage.cs: * Utils.cs: * ICacheEngine.cs: * IAVIMMessage.cs: * AVIMSignature.cs: * AVIMEventArgs.cs: * IAVIMListener.cs: * AVIMException.cs: * JustTest.cs: * FileTest.cs: * AVIMEnumerator.cs: * AVFile.cs: * QueryTest.cs: * AVIMTextMessage.cs: * AVQuery.cs: * AVObject.cs: * AVIMTypedMessage.cs: * AVIMImageMessage.cs: * IAVTimer.cs: * AVIMConversation.cs: * AVClient.cs: * AVIMAudioMessage.cs: * ISignatureFactory.cs: * AVIMCorePlugins.cs: * AVIMBinaryMessage.cs: * AVIMRecalledMessage.cs: * AVIMMessageListener.cs: * AckCommand.cs: * IAVIMPlatformHooks.cs: * AVIMConversationQuery.cs: * AVIMCommand.cs: * ReadCommand.cs: * PatchCommand.cs: * GoAwayListener.cs: * AVIMProtocol.cs: * MessageCommand.cs: * SessionListener.cs: * SessionCommand.cs: * AVIMTemporaryConversation.cs: * RouterState.cs: * AVRouterController.cs: * AVIMCommandRunner.cs: * IAVIMCommandRunner.cs: * AVDecoder.cs: * IAVRouterController.cs: * IWebSocketClient.cs: * MessagePatchListener.cs: * ConversationCommand.cs: * AVIMMessageFieldNameAttribute.cs: * AVIMMessageClassNameAttribute.cs: * QueryOperation.cs: * QueryCondition.cs: * OfflineMessageListener.cs: * AVIMTypedMessageTypeIntAttribute.cs: * AVTimer.Portable.cs: * AVIMConversationListener.cs: * ConversationUnreadListener.cs: * StringEngine.cs: * AWSUploader.cs: * DateTimeEngine.cs: * QiniuUploader.cs: * QCloudUploader.cs: * DictionaryEngine.cs: * AVFileController.cs: * FreeStyleMessageClassInfo.cs: * DefaultWebSocketClient.Portable.cs: * FreeStyleMessageClassingController.cs: * IFreeStyleMessageClassingController.cs:
2019-09-12 15:07:19 +08:00
using System.Threading;
using System.Threading.Tasks;
namespace LeanCloudTests {
public class FileTest {
* csharp-sdk.sln: chore: 重构 AVFile 为 AVObject 的子类 * RTM.csproj: * AVQuery2.cs: * AVRealtime.cs: * AVIMNotice.cs: * AVIMClient.cs: * AVIMMessage.cs: * Utils.cs: * ICacheEngine.cs: * IAVIMMessage.cs: * AVIMSignature.cs: * AVIMEventArgs.cs: * IAVIMListener.cs: * AVIMException.cs: * JustTest.cs: * FileTest.cs: * AVIMEnumerator.cs: * AVFile.cs: * QueryTest.cs: * AVIMTextMessage.cs: * AVQuery.cs: * AVObject.cs: * AVIMTypedMessage.cs: * AVIMImageMessage.cs: * IAVTimer.cs: * AVIMConversation.cs: * AVClient.cs: * AVIMAudioMessage.cs: * ISignatureFactory.cs: * AVIMCorePlugins.cs: * AVIMBinaryMessage.cs: * AVIMRecalledMessage.cs: * AVIMMessageListener.cs: * AckCommand.cs: * IAVIMPlatformHooks.cs: * AVIMConversationQuery.cs: * AVIMCommand.cs: * ReadCommand.cs: * PatchCommand.cs: * GoAwayListener.cs: * AVIMProtocol.cs: * MessageCommand.cs: * SessionListener.cs: * SessionCommand.cs: * AVIMTemporaryConversation.cs: * RouterState.cs: * AVRouterController.cs: * AVIMCommandRunner.cs: * IAVIMCommandRunner.cs: * AVDecoder.cs: * IAVRouterController.cs: * IWebSocketClient.cs: * MessagePatchListener.cs: * ConversationCommand.cs: * AVIMMessageFieldNameAttribute.cs: * AVIMMessageClassNameAttribute.cs: * QueryOperation.cs: * QueryCondition.cs: * OfflineMessageListener.cs: * AVIMTypedMessageTypeIntAttribute.cs: * AVTimer.Portable.cs: * AVIMConversationListener.cs: * ConversationUnreadListener.cs: * StringEngine.cs: * AWSUploader.cs: * DateTimeEngine.cs: * QiniuUploader.cs: * QCloudUploader.cs: * DictionaryEngine.cs: * AVFileController.cs: * FreeStyleMessageClassInfo.cs: * DefaultWebSocketClient.Portable.cs: * FreeStyleMessageClassingController.cs: * IFreeStyleMessageClassingController.cs:
2019-09-12 15:07:19 +08:00
string saveFileId;
[SetUp]
public void SetUp() {
Utils.InitNorthChina();
//Utils.InitEastChina();
* csharp-sdk.sln: chore: 重构 AVFile 为 AVObject 的子类 * RTM.csproj: * AVQuery2.cs: * AVRealtime.cs: * AVIMNotice.cs: * AVIMClient.cs: * AVIMMessage.cs: * Utils.cs: * ICacheEngine.cs: * IAVIMMessage.cs: * AVIMSignature.cs: * AVIMEventArgs.cs: * IAVIMListener.cs: * AVIMException.cs: * JustTest.cs: * FileTest.cs: * AVIMEnumerator.cs: * AVFile.cs: * QueryTest.cs: * AVIMTextMessage.cs: * AVQuery.cs: * AVObject.cs: * AVIMTypedMessage.cs: * AVIMImageMessage.cs: * IAVTimer.cs: * AVIMConversation.cs: * AVClient.cs: * AVIMAudioMessage.cs: * ISignatureFactory.cs: * AVIMCorePlugins.cs: * AVIMBinaryMessage.cs: * AVIMRecalledMessage.cs: * AVIMMessageListener.cs: * AckCommand.cs: * IAVIMPlatformHooks.cs: * AVIMConversationQuery.cs: * AVIMCommand.cs: * ReadCommand.cs: * PatchCommand.cs: * GoAwayListener.cs: * AVIMProtocol.cs: * MessageCommand.cs: * SessionListener.cs: * SessionCommand.cs: * AVIMTemporaryConversation.cs: * RouterState.cs: * AVRouterController.cs: * AVIMCommandRunner.cs: * IAVIMCommandRunner.cs: * AVDecoder.cs: * IAVRouterController.cs: * IWebSocketClient.cs: * MessagePatchListener.cs: * ConversationCommand.cs: * AVIMMessageFieldNameAttribute.cs: * AVIMMessageClassNameAttribute.cs: * QueryOperation.cs: * QueryCondition.cs: * OfflineMessageListener.cs: * AVIMTypedMessageTypeIntAttribute.cs: * AVTimer.Portable.cs: * AVIMConversationListener.cs: * ConversationUnreadListener.cs: * StringEngine.cs: * AWSUploader.cs: * DateTimeEngine.cs: * QiniuUploader.cs: * QCloudUploader.cs: * DictionaryEngine.cs: * AVFileController.cs: * FreeStyleMessageClassInfo.cs: * DefaultWebSocketClient.Portable.cs: * FreeStyleMessageClassingController.cs: * IFreeStyleMessageClassingController.cs:
2019-09-12 15:07:19 +08:00
//Utils.InitOldEastChina();
//Utils.InitUS();
}
* csharp-sdk.sln: chore: 重构 AVFile 为 AVObject 的子类 * RTM.csproj: * AVQuery2.cs: * AVRealtime.cs: * AVIMNotice.cs: * AVIMClient.cs: * AVIMMessage.cs: * Utils.cs: * ICacheEngine.cs: * IAVIMMessage.cs: * AVIMSignature.cs: * AVIMEventArgs.cs: * IAVIMListener.cs: * AVIMException.cs: * JustTest.cs: * FileTest.cs: * AVIMEnumerator.cs: * AVFile.cs: * QueryTest.cs: * AVIMTextMessage.cs: * AVQuery.cs: * AVObject.cs: * AVIMTypedMessage.cs: * AVIMImageMessage.cs: * IAVTimer.cs: * AVIMConversation.cs: * AVClient.cs: * AVIMAudioMessage.cs: * ISignatureFactory.cs: * AVIMCorePlugins.cs: * AVIMBinaryMessage.cs: * AVIMRecalledMessage.cs: * AVIMMessageListener.cs: * AckCommand.cs: * IAVIMPlatformHooks.cs: * AVIMConversationQuery.cs: * AVIMCommand.cs: * ReadCommand.cs: * PatchCommand.cs: * GoAwayListener.cs: * AVIMProtocol.cs: * MessageCommand.cs: * SessionListener.cs: * SessionCommand.cs: * AVIMTemporaryConversation.cs: * RouterState.cs: * AVRouterController.cs: * AVIMCommandRunner.cs: * IAVIMCommandRunner.cs: * AVDecoder.cs: * IAVRouterController.cs: * IWebSocketClient.cs: * MessagePatchListener.cs: * ConversationCommand.cs: * AVIMMessageFieldNameAttribute.cs: * AVIMMessageClassNameAttribute.cs: * QueryOperation.cs: * QueryCondition.cs: * OfflineMessageListener.cs: * AVIMTypedMessageTypeIntAttribute.cs: * AVTimer.Portable.cs: * AVIMConversationListener.cs: * ConversationUnreadListener.cs: * StringEngine.cs: * AWSUploader.cs: * DateTimeEngine.cs: * QiniuUploader.cs: * QCloudUploader.cs: * DictionaryEngine.cs: * AVFileController.cs: * FreeStyleMessageClassInfo.cs: * DefaultWebSocketClient.Portable.cs: * FreeStyleMessageClassingController.cs: * IFreeStyleMessageClassingController.cs:
2019-09-12 15:07:19 +08:00
[Test, Order(0)]
public async Task SaveImage() {
AVFile file = new AVFile("hello.png", File.ReadAllBytes("../../../assets/hello.png"));
await file.SaveAsync();
Assert.NotNull(file.ObjectId);
* csharp-sdk.sln: chore: 重构 AVFile 为 AVObject 的子类 * RTM.csproj: * AVQuery2.cs: * AVRealtime.cs: * AVIMNotice.cs: * AVIMClient.cs: * AVIMMessage.cs: * Utils.cs: * ICacheEngine.cs: * IAVIMMessage.cs: * AVIMSignature.cs: * AVIMEventArgs.cs: * IAVIMListener.cs: * AVIMException.cs: * JustTest.cs: * FileTest.cs: * AVIMEnumerator.cs: * AVFile.cs: * QueryTest.cs: * AVIMTextMessage.cs: * AVQuery.cs: * AVObject.cs: * AVIMTypedMessage.cs: * AVIMImageMessage.cs: * IAVTimer.cs: * AVIMConversation.cs: * AVClient.cs: * AVIMAudioMessage.cs: * ISignatureFactory.cs: * AVIMCorePlugins.cs: * AVIMBinaryMessage.cs: * AVIMRecalledMessage.cs: * AVIMMessageListener.cs: * AckCommand.cs: * IAVIMPlatformHooks.cs: * AVIMConversationQuery.cs: * AVIMCommand.cs: * ReadCommand.cs: * PatchCommand.cs: * GoAwayListener.cs: * AVIMProtocol.cs: * MessageCommand.cs: * SessionListener.cs: * SessionCommand.cs: * AVIMTemporaryConversation.cs: * RouterState.cs: * AVRouterController.cs: * AVIMCommandRunner.cs: * IAVIMCommandRunner.cs: * AVDecoder.cs: * IAVRouterController.cs: * IWebSocketClient.cs: * MessagePatchListener.cs: * ConversationCommand.cs: * AVIMMessageFieldNameAttribute.cs: * AVIMMessageClassNameAttribute.cs: * QueryOperation.cs: * QueryCondition.cs: * OfflineMessageListener.cs: * AVIMTypedMessageTypeIntAttribute.cs: * AVTimer.Portable.cs: * AVIMConversationListener.cs: * ConversationUnreadListener.cs: * StringEngine.cs: * AWSUploader.cs: * DateTimeEngine.cs: * QiniuUploader.cs: * QCloudUploader.cs: * DictionaryEngine.cs: * AVFileController.cs: * FreeStyleMessageClassInfo.cs: * DefaultWebSocketClient.Portable.cs: * FreeStyleMessageClassingController.cs: * IFreeStyleMessageClassingController.cs:
2019-09-12 15:07:19 +08:00
saveFileId = file.ObjectId;
TestContext.Out.WriteLine($"file: {file.ObjectId}, {file.Url}");
}
* csharp-sdk.sln: chore: 重构 AVFile 为 AVObject 的子类 * RTM.csproj: * AVQuery2.cs: * AVRealtime.cs: * AVIMNotice.cs: * AVIMClient.cs: * AVIMMessage.cs: * Utils.cs: * ICacheEngine.cs: * IAVIMMessage.cs: * AVIMSignature.cs: * AVIMEventArgs.cs: * IAVIMListener.cs: * AVIMException.cs: * JustTest.cs: * FileTest.cs: * AVIMEnumerator.cs: * AVFile.cs: * QueryTest.cs: * AVIMTextMessage.cs: * AVQuery.cs: * AVObject.cs: * AVIMTypedMessage.cs: * AVIMImageMessage.cs: * IAVTimer.cs: * AVIMConversation.cs: * AVClient.cs: * AVIMAudioMessage.cs: * ISignatureFactory.cs: * AVIMCorePlugins.cs: * AVIMBinaryMessage.cs: * AVIMRecalledMessage.cs: * AVIMMessageListener.cs: * AckCommand.cs: * IAVIMPlatformHooks.cs: * AVIMConversationQuery.cs: * AVIMCommand.cs: * ReadCommand.cs: * PatchCommand.cs: * GoAwayListener.cs: * AVIMProtocol.cs: * MessageCommand.cs: * SessionListener.cs: * SessionCommand.cs: * AVIMTemporaryConversation.cs: * RouterState.cs: * AVRouterController.cs: * AVIMCommandRunner.cs: * IAVIMCommandRunner.cs: * AVDecoder.cs: * IAVRouterController.cs: * IWebSocketClient.cs: * MessagePatchListener.cs: * ConversationCommand.cs: * AVIMMessageFieldNameAttribute.cs: * AVIMMessageClassNameAttribute.cs: * QueryOperation.cs: * QueryCondition.cs: * OfflineMessageListener.cs: * AVIMTypedMessageTypeIntAttribute.cs: * AVTimer.Portable.cs: * AVIMConversationListener.cs: * ConversationUnreadListener.cs: * StringEngine.cs: * AWSUploader.cs: * DateTimeEngine.cs: * QiniuUploader.cs: * QCloudUploader.cs: * DictionaryEngine.cs: * AVFileController.cs: * FreeStyleMessageClassInfo.cs: * DefaultWebSocketClient.Portable.cs: * FreeStyleMessageClassingController.cs: * IFreeStyleMessageClassingController.cs:
2019-09-12 15:07:19 +08:00
[Test, Order(1)]
public async Task SaveBigFile() {
AVFile file = new AVFile("test.apk", File.ReadAllBytes("../../../assets/test.apk"));
await file.SaveAsync();
Assert.NotNull(file.ObjectId);
TestContext.Out.WriteLine($"file: {file.ObjectId}, {file.Url}");
}
* csharp-sdk.sln: chore: 重构 AVFile 为 AVObject 的子类 * RTM.csproj: * AVQuery2.cs: * AVRealtime.cs: * AVIMNotice.cs: * AVIMClient.cs: * AVIMMessage.cs: * Utils.cs: * ICacheEngine.cs: * IAVIMMessage.cs: * AVIMSignature.cs: * AVIMEventArgs.cs: * IAVIMListener.cs: * AVIMException.cs: * JustTest.cs: * FileTest.cs: * AVIMEnumerator.cs: * AVFile.cs: * QueryTest.cs: * AVIMTextMessage.cs: * AVQuery.cs: * AVObject.cs: * AVIMTypedMessage.cs: * AVIMImageMessage.cs: * IAVTimer.cs: * AVIMConversation.cs: * AVClient.cs: * AVIMAudioMessage.cs: * ISignatureFactory.cs: * AVIMCorePlugins.cs: * AVIMBinaryMessage.cs: * AVIMRecalledMessage.cs: * AVIMMessageListener.cs: * AckCommand.cs: * IAVIMPlatformHooks.cs: * AVIMConversationQuery.cs: * AVIMCommand.cs: * ReadCommand.cs: * PatchCommand.cs: * GoAwayListener.cs: * AVIMProtocol.cs: * MessageCommand.cs: * SessionListener.cs: * SessionCommand.cs: * AVIMTemporaryConversation.cs: * RouterState.cs: * AVRouterController.cs: * AVIMCommandRunner.cs: * IAVIMCommandRunner.cs: * AVDecoder.cs: * IAVRouterController.cs: * IWebSocketClient.cs: * MessagePatchListener.cs: * ConversationCommand.cs: * AVIMMessageFieldNameAttribute.cs: * AVIMMessageClassNameAttribute.cs: * QueryOperation.cs: * QueryCondition.cs: * OfflineMessageListener.cs: * AVIMTypedMessageTypeIntAttribute.cs: * AVTimer.Portable.cs: * AVIMConversationListener.cs: * ConversationUnreadListener.cs: * StringEngine.cs: * AWSUploader.cs: * DateTimeEngine.cs: * QiniuUploader.cs: * QCloudUploader.cs: * DictionaryEngine.cs: * AVFileController.cs: * FreeStyleMessageClassInfo.cs: * DefaultWebSocketClient.Portable.cs: * FreeStyleMessageClassingController.cs: * IFreeStyleMessageClassingController.cs:
2019-09-12 15:07:19 +08:00
[Test, Order(2)]
public async Task SaveUrl() {
AVFile file = new AVFile("test.jpg", "http://pic33.nipic.com/20131007/13639685_123501617185_2.jpg");
await file.SaveAsync();
Assert.NotNull(file.ObjectId);
TestContext.Out.WriteLine($"file: {file.ObjectId}, {file.Url}");
}
* csharp-sdk.sln: chore: 重构 AVFile 为 AVObject 的子类 * RTM.csproj: * AVQuery2.cs: * AVRealtime.cs: * AVIMNotice.cs: * AVIMClient.cs: * AVIMMessage.cs: * Utils.cs: * ICacheEngine.cs: * IAVIMMessage.cs: * AVIMSignature.cs: * AVIMEventArgs.cs: * IAVIMListener.cs: * AVIMException.cs: * JustTest.cs: * FileTest.cs: * AVIMEnumerator.cs: * AVFile.cs: * QueryTest.cs: * AVIMTextMessage.cs: * AVQuery.cs: * AVObject.cs: * AVIMTypedMessage.cs: * AVIMImageMessage.cs: * IAVTimer.cs: * AVIMConversation.cs: * AVClient.cs: * AVIMAudioMessage.cs: * ISignatureFactory.cs: * AVIMCorePlugins.cs: * AVIMBinaryMessage.cs: * AVIMRecalledMessage.cs: * AVIMMessageListener.cs: * AckCommand.cs: * IAVIMPlatformHooks.cs: * AVIMConversationQuery.cs: * AVIMCommand.cs: * ReadCommand.cs: * PatchCommand.cs: * GoAwayListener.cs: * AVIMProtocol.cs: * MessageCommand.cs: * SessionListener.cs: * SessionCommand.cs: * AVIMTemporaryConversation.cs: * RouterState.cs: * AVRouterController.cs: * AVIMCommandRunner.cs: * IAVIMCommandRunner.cs: * AVDecoder.cs: * IAVRouterController.cs: * IWebSocketClient.cs: * MessagePatchListener.cs: * ConversationCommand.cs: * AVIMMessageFieldNameAttribute.cs: * AVIMMessageClassNameAttribute.cs: * QueryOperation.cs: * QueryCondition.cs: * OfflineMessageListener.cs: * AVIMTypedMessageTypeIntAttribute.cs: * AVTimer.Portable.cs: * AVIMConversationListener.cs: * ConversationUnreadListener.cs: * StringEngine.cs: * AWSUploader.cs: * DateTimeEngine.cs: * QiniuUploader.cs: * QCloudUploader.cs: * DictionaryEngine.cs: * AVFileController.cs: * FreeStyleMessageClassInfo.cs: * DefaultWebSocketClient.Portable.cs: * FreeStyleMessageClassingController.cs: * IFreeStyleMessageClassingController.cs:
2019-09-12 15:07:19 +08:00
[Test, Order(3)]
public async Task Thumbnail() {
* csharp-sdk.sln: chore: 重构 AVFile 为 AVObject 的子类 * RTM.csproj: * AVQuery2.cs: * AVRealtime.cs: * AVIMNotice.cs: * AVIMClient.cs: * AVIMMessage.cs: * Utils.cs: * ICacheEngine.cs: * IAVIMMessage.cs: * AVIMSignature.cs: * AVIMEventArgs.cs: * IAVIMListener.cs: * AVIMException.cs: * JustTest.cs: * FileTest.cs: * AVIMEnumerator.cs: * AVFile.cs: * QueryTest.cs: * AVIMTextMessage.cs: * AVQuery.cs: * AVObject.cs: * AVIMTypedMessage.cs: * AVIMImageMessage.cs: * IAVTimer.cs: * AVIMConversation.cs: * AVClient.cs: * AVIMAudioMessage.cs: * ISignatureFactory.cs: * AVIMCorePlugins.cs: * AVIMBinaryMessage.cs: * AVIMRecalledMessage.cs: * AVIMMessageListener.cs: * AckCommand.cs: * IAVIMPlatformHooks.cs: * AVIMConversationQuery.cs: * AVIMCommand.cs: * ReadCommand.cs: * PatchCommand.cs: * GoAwayListener.cs: * AVIMProtocol.cs: * MessageCommand.cs: * SessionListener.cs: * SessionCommand.cs: * AVIMTemporaryConversation.cs: * RouterState.cs: * AVRouterController.cs: * AVIMCommandRunner.cs: * IAVIMCommandRunner.cs: * AVDecoder.cs: * IAVRouterController.cs: * IWebSocketClient.cs: * MessagePatchListener.cs: * ConversationCommand.cs: * AVIMMessageFieldNameAttribute.cs: * AVIMMessageClassNameAttribute.cs: * QueryOperation.cs: * QueryCondition.cs: * OfflineMessageListener.cs: * AVIMTypedMessageTypeIntAttribute.cs: * AVTimer.Portable.cs: * AVIMConversationListener.cs: * ConversationUnreadListener.cs: * StringEngine.cs: * AWSUploader.cs: * DateTimeEngine.cs: * QiniuUploader.cs: * QCloudUploader.cs: * DictionaryEngine.cs: * AVFileController.cs: * FreeStyleMessageClassInfo.cs: * DefaultWebSocketClient.Portable.cs: * FreeStyleMessageClassingController.cs: * IFreeStyleMessageClassingController.cs:
2019-09-12 15:07:19 +08:00
AVQuery<AVFile> query = new AVQuery<AVFile>();
AVFile file = await query.GetAsync(saveFileId, CancellationToken.None);
Assert.NotNull(file);
TestContext.Out.WriteLine($"url: {file.Url}");
TestContext.Out.WriteLine($"thumbnail url: {file.GetThumbnailUrl(28, 28)}");
}
* csharp-sdk.sln: chore: 重构 AVFile 为 AVObject 的子类 * RTM.csproj: * AVQuery2.cs: * AVRealtime.cs: * AVIMNotice.cs: * AVIMClient.cs: * AVIMMessage.cs: * Utils.cs: * ICacheEngine.cs: * IAVIMMessage.cs: * AVIMSignature.cs: * AVIMEventArgs.cs: * IAVIMListener.cs: * AVIMException.cs: * JustTest.cs: * FileTest.cs: * AVIMEnumerator.cs: * AVFile.cs: * QueryTest.cs: * AVIMTextMessage.cs: * AVQuery.cs: * AVObject.cs: * AVIMTypedMessage.cs: * AVIMImageMessage.cs: * IAVTimer.cs: * AVIMConversation.cs: * AVClient.cs: * AVIMAudioMessage.cs: * ISignatureFactory.cs: * AVIMCorePlugins.cs: * AVIMBinaryMessage.cs: * AVIMRecalledMessage.cs: * AVIMMessageListener.cs: * AckCommand.cs: * IAVIMPlatformHooks.cs: * AVIMConversationQuery.cs: * AVIMCommand.cs: * ReadCommand.cs: * PatchCommand.cs: * GoAwayListener.cs: * AVIMProtocol.cs: * MessageCommand.cs: * SessionListener.cs: * SessionCommand.cs: * AVIMTemporaryConversation.cs: * RouterState.cs: * AVRouterController.cs: * AVIMCommandRunner.cs: * IAVIMCommandRunner.cs: * AVDecoder.cs: * IAVRouterController.cs: * IWebSocketClient.cs: * MessagePatchListener.cs: * ConversationCommand.cs: * AVIMMessageFieldNameAttribute.cs: * AVIMMessageClassNameAttribute.cs: * QueryOperation.cs: * QueryCondition.cs: * OfflineMessageListener.cs: * AVIMTypedMessageTypeIntAttribute.cs: * AVTimer.Portable.cs: * AVIMConversationListener.cs: * ConversationUnreadListener.cs: * StringEngine.cs: * AWSUploader.cs: * DateTimeEngine.cs: * QiniuUploader.cs: * QCloudUploader.cs: * DictionaryEngine.cs: * AVFileController.cs: * FreeStyleMessageClassInfo.cs: * DefaultWebSocketClient.Portable.cs: * FreeStyleMessageClassingController.cs: * IFreeStyleMessageClassingController.cs:
2019-09-12 15:07:19 +08:00
[Test, Order(4)]
public async Task DeleteFile() {
AVFile file = new AVFile("hello.png", File.ReadAllBytes("../../../assets/hello.png"));
await file.SaveAsync();
Assert.NotNull(file.ObjectId);
await file.DeleteAsync();
}
}
}