Testing Strategy

ManagedCode.Storage uses xUnit + Shouldly and aims to verify storage behaviour through realistic flows (upload/download/list/delete/metadata) with minimal mocking.

Test Project

Suite Map

flowchart TD
  Tests[ManagedCode.Storage.Tests] --> Core[Core helpers + invariants]
  Tests --> Providers[Provider suites]
  Tests --> AspNet[ASP.NET controllers + SignalR]
  Tests --> Vfs[VFS suites]

  Providers --> Containers["Testcontainers (Azurite/LocalStack/FakeGcsServer/SFTP)"]
  Providers --> CloudDrive["CloudDrive (Graph/Drive/Dropbox)"]
  CloudDrive --> HttpFakes[HttpMessageHandler fakes wired into official SDK clients]

Structure

Tests are grouped by “surface” and provider:

External Dependencies

Where possible, tests run without real cloud accounts:

Categories

Some tests are marked as “large file” to validate streaming behaviour:

Run everything (canonical):

dotnet test Tests/ManagedCode.Storage.Tests/ManagedCode.Storage.Tests.csproj --configuration Release

Skip large-file tests when iterating:

dotnet test Tests/ManagedCode.Storage.Tests/ManagedCode.Storage.Tests.csproj --configuration Release --filter "Category!=LargeFile"

Quality Rules