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())); }
/// <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); }
/// <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(); }
public DisposingFileSystem(FileSystemClient fileSystem, IDictionary <string, string> metadata, Models.PublicAccessType publicAccessType = default) { fileSystem.CreateAsync(metadata: metadata, publicAccessType: publicAccessType).Wait(); FileSystemClient = fileSystem; }