public async Task GetBlobListReturnsAllBlobsInContainer() { var objId1 = Guid.NewGuid().ToString(); var objId2 = Guid.NewGuid().ToString(); var azureBlobContainer = new TestAzureBlobContainer( CloudConfiguration.GetStorageAccount("DataConnectionString"), AzureBlobTestContainer); await azureBlobContainer.SaveAsync(objId1, "testText"); await azureBlobContainer.SaveAsync(objId2, "testText"); var blobList = azureBlobContainer.GetBlobList().Select(b => b.Name).ToList(); CollectionAssert.Contains(blobList, objId1); CollectionAssert.Contains(blobList, objId2); }
public async Task SaveShouldStoreTheBlob() { var objId = Guid.NewGuid().ToString(); var azureBlobContainer = new TestAzureBlobContainer( account, AzureBlobTestContainer); await azureBlobContainer.SaveAsync(objId, "testText"); Assert.IsNotNull(await azureBlobContainer.GetAsync(objId)); }
public async Task SaveShouldStoreTheBlob() { var objId = Guid.NewGuid().ToString(); var azureBlobContainer = new TestAzureBlobContainer( CloudConfiguration.GetStorageAccount("DataConnectionString"), AzureBlobTestContainer); await azureBlobContainer.SaveAsync(objId, "testText"); Assert.IsNotNull(await azureBlobContainer.GetAsync(objId)); }
public async Task CreateNewBlob() { var azureBlobContainer = new TestAzureBlobContainer( account, AzureBlobTestContainer); var objId = Guid.NewGuid().ToString(); var text = await azureBlobContainer.GetAsync(objId); Assert.IsNull(text); await azureBlobContainer.SaveAsync(objId, "testText"); text = await azureBlobContainer.GetAsync(objId); Assert.IsNotNull(text); }