in storage/testapp/Assets/Firebase/Sample/Storage/UIHandlerAutomated.cs [110:186]
protected override void Start() {
// Set the list of tests to run, note this is done at Start since they are
// non-static.
Func<Task>[] tests = {
TestCreateDestroy,
TestCreateDestroyRace,
TestStorageReferenceNavigation,
TestUrl,
TestGetReference,
TestGetStorageInvalidUris,
TestGetStorageWrongBucket,
TestUploadBytesLargeFile,
TestUploadBytesSmallFile,
TestUploadBytesSmallFileWithNoMetadata,
TestUploadBytesSmallFileWithNonCustomOnlyMetadata,
TestUploadBytesSmallFileWithCustomOnlyMetadata,
TestUploadBytesSmallFileWithBothMetadata,
TestUploadBytesSmallFileThenUpdateMetadata,
TestUploadStreamLargeFile,
TestUploadStreamSmallFile,
TestUploadFromFileLargeFile,
TestUploadFromFileSmallFile,
TestUploadFromNonExistantFile,
TestUploadBytesWithCancelation,
TestUploadStreamWithCancelation,
TestUploadFromFileWithCancelation,
TestUploadSmallFileGetDownloadUrl,
TestGetDownloadUrlNonExistantFile,
TestUploadSmallFileGetMetadata,
TestGetMetadataNonExistantFile,
TestUploadSmallFileAndDelete,
TestDeleteNonExistantFile,
TestDownloadNonExistantFile,
TestUploadSmallFileAndDownload,
TestUploadSmallFileAndDownloadWithProgressExceptions,
TestUploadLargeFileAndDownload,
TestUploadLargeFileAndDownloadWithCancelation,
TestUploadSmallFileAndDownloadUsingStreamCallback,
TestUploadLargeFileAndDownloadUsingStreamCallback,
TestUploadLargeFileAndDownloadUsingStreamCallbackWithCancelation,
TestUploadSmallFileAndDownloadToFile,
TestUploadLargeFileAndDownloadToFile,
TestUploadLargeFileAndDownloadToFileWithCancelation,
};
testRunner = AutomatedTestRunner.CreateTestRunner(
testsToRun: tests,
logFunc: DebugLog
);
mainThreadDispatcher = gameObject.AddComponent<MainThreadDispatcher>();
if (mainThreadDispatcher == null) {
Debug.LogError("Could not create MainThreadDispatcher component!");
return;
}
Debug.Log("NOTE: Some API calls report failures using UnityEngine.Debug.LogError which will " +
"pause execution in the editor when 'Error Pause' in the console window is " +
"enabled. `Error Pause` should be disabled to execute this test.");
var largeFileSize = 512 * 1024;
int repeatedLines = largeFileSize / FILE_LINE.Length;
int partialLineLength = largeFileSize % FILE_LINE.Length;
var builder = new StringBuilder();
for (int i = 0; i < repeatedLines; ++i) {
builder.Append(FILE_LINE.Replace('X', (i % 10).ToString()[0]));
}
builder.Append(FILE_LINE.Substring(0, partialLineLength));
LARGE_FILE_CONTENTS = builder.ToString();
oldImplementationCompatibility = Type.GetType(
"Firebase.Storage.FirebaseStorageInternal, Firebase.Storage, Version=1.0.0.0, " +
"Culture=neutral") == null;
UIEnabled = false;
base.Start();
}