public async Task DeleteShouldRemoveTheBlob() { var objId = Guid.NewGuid().ToString(); var azureBlobContainer = new AzureBlobContainer <string>( account, AzureBlobTestContainer); await azureBlobContainer.SaveAsync(objId, "testText"); Assert.IsNotNull(await azureBlobContainer.GetAsync(objId)); await azureBlobContainer.DeleteAsync(objId); Assert.IsNull(await azureBlobContainer.GetAsync(objId)); }
public async Task SaveAndDelete() { var surveyStorage = new AzureBlobContainer <Survey>(account, SurveyContainer); var expectedSurvey = new Survey { Title = "title", SlugName = "slugname" }; await surveyStorage.SaveAsync(expectedSurvey.SlugName, expectedSurvey); Survey savedSurvey = await surveyStorage.GetAsync(expectedSurvey.SlugName); Assert.IsNotNull(savedSurvey); await surveyStorage.DeleteAsync(expectedSurvey.SlugName); Survey deletedSurveyAnswer = await surveyStorage.GetAsync(expectedSurvey.SlugName); Assert.IsNull(deletedSurveyAnswer); }