hunterlan / hunterlan/AzStorage

Application: storage account connection abstraction & use case

Open
#9 0 comments 0 reactions 0 assignees View on GitHub

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 IStorageAccountConnector interface in AzStorage.Application with a method like ValidateAndConnectAsync(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 to IStorageAccountConnector.
  • 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.Application has zero direct dependency on Azure.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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.