hunterlan / hunterlan/AzStorage
Application: storage account connection abstraction & use case
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Goal
Define an application-layer port for connecting to and validating a storage account, independent of the concrete Azure SDK.
Why
Following ports-and-adapters (Domain/Application define interfaces, Infrastructure implements them with the Azure SDK) keeps business logic testable and swappable — e.g. easy to fake in unit tests, and open to supporting Azurite or other stores later.
Tasks
- Add
IStorageAccountConnectorinterface inAzStorage.Applicationwith a method likeValidateAndConnectAsync(StorageAccount account, CancellationToken ct). - Add a
ConnectToStorageAccountUseCase(plain class is fine, no need for a mediator library yet) that validates the domain object and delegates toIStorageAccountConnector. - Add a clear result type (success / specific failure reasons: invalid credentials, network error, forbidden) instead of leaking raw exceptions, so a future UI can show helpful error messages — this directly targets the common Storage Explorer complaint about vague "Unable to retrieve children" errors.
- Add unit tests using a fake/mock
IStorageAccountConnector.
Acceptance Criteria
AzStorage.Applicationhas zero direct dependency onAzure.Storage.*packages.- Unit tests cover success and at least two distinct failure scenarios.
Depends on
- Domain: model Storage Account & connection credentials
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in the AzStorage.Application project and inspect the existing Storage Account domain model and project references, then review the Azure SDK boundary described in the issue. Add the interface, use case, result handling, and fake or mock unit tests; done means the application project has no Azure.Storage.* dependency and tests cover success plus at least two failure scenarios.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, csharp
- Domain
- backend, cloud, testing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100