Skip to content
This repository was archived by the owner on Jan 5, 2026. It is now read-only.

[#6292] Add unit tests for AzureBlobStorage - #6301

Merged
Gabo Gilabert (gabog) merged 2 commits into
mainfrom
southworks/update/azure-blobs-storage-tests
May 17, 2022
Merged

Gabo Gilabert (gabog) merged 2 commits into
mainfrom
southworks/update/azure-blobs-storage-tests

Conversation

@ceciliaavila

Copy link
Copy Markdown
Collaborator

Addresses #6292
#minor

Description

This PR removes the existing Functional tests for the AzureBlobStorage class and replaces them with unit tests that don't require the use of the Azure Storage Emulator.

Specific Changes

  • Updates the AzureBlobStorage class, adding a new internal constructor that receives an instance of CloudBlobClient. This constructor is for the use of the tests only.
  • Replaces the existing tests in the AzureBlobStorageTests class with unit tests for each method, constructor, method validations, etc, reaching 89% of code coverage.

Testing

The following images show the new unit tests and the code coverage.
image

@ceciliaavila Cecilia Avila (ceciliaavila) added the Automation: No parity PR does not need to be applied to other languages. label Apr 25, 2022
@ceciliaavila
Cecilia Avila (ceciliaavila) requested a review from a team as a code owner April 25, 2022 17:26
@coveralls

Coveralls (coveralls) commented Apr 25, 2022 •

Copy link
Copy Markdown
Collaborator

Pull Request Test Coverage Report for Build 304856

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 25 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.2%) to 78.945%

Files with Coverage Reduction New Missed Lines %
/libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Actions/ForEachElement.cs 8 90.0%
/libraries/Microsoft.Bot.Builder/BotFrameworkAdapter.cs 17 47.91%
Totals Coverage Status
Change from base Build 301524: 0.2%
Covered Lines: 25373
Relevant Lines: 32140

💛 - Coveralls

Comment thread libraries/Microsoft.Bot.Builder.Azure/AzureBlobStorage.cs Outdated
@BruceHaley

Copy link
Copy Markdown
Contributor

✔️ No Binary Compatibility issues for Microsoft.Bot.Builder.Azure.dll

@gabog
Gabo Gilabert (gabog) merged commit 3ffab3a into main May 17, 2022
@gabog
Gabo Gilabert (gabog) deleted the southworks/update/azure-blobs-storage-tests branch May 17, 2022 17:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Automation: No parity PR does not need to be applied to other languages.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants