public virtual async Task <Response <FileSystemClient> > CreateFileSystemAsync(
            string fileSystemName,
            PublicAccessType publicAccessType = PublicAccessType.None,
            Metadata metadata = default,
            CancellationToken cancellationToken = default)
        {
            FileSystemClient          fileSystem = GetFileSystemClient(fileSystemName);
            Response <FileSystemInfo> response   = await fileSystem.CreateAsync(publicAccessType, metadata, cancellationToken).ConfigureAwait(false);

            return(Response.FromValue(fileSystem, response.GetRawResponse()));
        }
Exemple #2
0
        /// <summary>
        ///   Performs the tasks needed to initialize and set up the environment for the test scenario.
        ///   When multiple instances are run in parallel, the setup will take place once, prior to the
        ///   execution of the first test instance.
        /// </summary>
        ///
        public async override Task GlobalSetupAsync()
        {
            await base.GlobalSetupAsync();

            await FileSystemClient.CreateAsync();

            // Create the test file that will be used for reading.

            using var randomStream = RandomStream.Create(Options.Size);

            await FileClient.CreateAsync();

            await FileClient.UploadAsync(randomStream, true);
        }
Exemple #3
0
        /// <summary>
        ///   Performs the tasks needed to initialize and set up the environment for the test scenario.
        ///   When multiple instances are run in parallel, the setup will take place once, prior to the
        ///   execution of the first test instance.
        /// </summary>
        ///
        public async override Task GlobalSetupAsync()
        {
            await base.GlobalSetupAsync();

            await FileSystemClient.CreateAsync();
        }
Exemple #4
0
            public DisposingFileSystem(FileSystemClient fileSystem, IDictionary <string, string> metadata, Models.PublicAccessType publicAccessType = default)
            {
                fileSystem.CreateAsync(metadata: metadata, publicAccessType: publicAccessType).Wait();

                FileSystemClient = fileSystem;
            }