1- // Copyright (c) .NET Foundation. All rights reserved.
1+ // Copyright (c) .NET Foundation. All rights reserved.
22// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33
44using System ;
5- using Microsoft . WindowsAzure . Storage ;
6- using Microsoft . WindowsAzure . Storage . Blob ;
5+ using Azure . Storage . Blobs ;
76
87namespace Validation . Common . Job . Tests . Leases
98{
@@ -30,23 +29,21 @@ public BlobStorageFixture()
3029 TestRunId = Guid . NewGuid ( ) . ToString ( ) ;
3130 ConnectionString = GetEnvironmentVariable ( ConnectionStringName , required : true ) ;
3231
33- GetContainerReference ( ) . CreateIfNotExists ( ) ;
32+ GetBlobContainerClient ( ) . CreateIfNotExists ( ) ;
3433 }
3534
3635 public string TestRunId { get ; }
3736 public string ConnectionString { get ; }
3837
3938 public void Dispose ( )
4039 {
41- GetContainerReference ( ) . DeleteIfExists ( ) ;
40+ GetBlobContainerClient ( ) . DeleteIfExists ( ) ;
4241 }
4342
44- private CloudBlobContainer GetContainerReference ( )
43+ private BlobContainerClient GetBlobContainerClient ( )
4544 {
46- var account = CloudStorageAccount . Parse ( ConnectionString ) ;
47- var blobClient = account . CreateCloudBlobClient ( ) ;
48- var container = blobClient . GetContainerReference ( TestRunId ) ;
49- return container ;
45+ var blobServiceClient = new BlobServiceClient ( ConnectionString ) ;
46+ return blobServiceClient . GetBlobContainerClient ( TestRunId ) ;
5047 }
5148
5249 private static string GetEnvironmentVariable ( string name , bool required )
0 commit comments