QA-specific knowledge for testing the SettingsOnADO library. Use when planning test strategies, evaluating coverage gaps, writing acceptance criteria, investigating regressions, designing test matrices, or assessing release readiness. Covers: test inventory, coverage analysis, risk-based testing priorities, edge case catalog, schema evolution testing, encryption verification, pub/sub reliability, and test environment setup. SELF-UPDATING: When your work changes, advances, or extends testing in SettingsOnADO (new test projects, coverage changes, discovered edge cases, resolved defects, etc.), you MUST update this skill to reflect the new state before completing your task.
| Project | Scope | Type |
|---|---|---|
| SettingsOnADO.Tests | Core library (SettingsManager, SchemaManager, Repository, encryption, pub/sub, cache) | Unit (Moq) + Integration (SQLite) |
| SettingsOnADO.Json.Tests | JSON file-based settings provider | Unit + Integration (file-based) |
Core Tests (SettingsOnADO.Tests):
| File | Focus | Style |
|---|---|---|
| SettingsManagerTests.cs | Get/Update contracts | Unit (Moq ISettingsRepository) |
| SettingsManagerIntegrationTests.cs | Full stack round-trips | Integration (SQLite in-memory) |
| SettingsManagerPubSubTests.cs |
| Subscribe/Unsubscribe/Notify |
| Integration |
| SettingsManagerWithCacheTests.cs | Cache decorator behavior | Unit (Moq ISettingsManager) |
| SchemaManagerTests.cs | Table creation, column add/drop | Integration (SQLite) |
| SettingsRepositoryTests.cs | Persistence, encryption, schema evolution | Integration (SQLite) |
JSON Tests (SettingsOnADO.Json.Tests):
| File | Focus | Style |
|---|---|---|
| JsonSettingsManagerTests.cs | JSON manager, versioning, deprecated properties | Unit |
| JsonSettingsManagerIntegrationTests.cs | File I/O, concurrent access, multi-settings | Integration (file-based) |
dotnet test --configuration Release
dotnet test --configuration Release --collect:"XPlat Code Coverage"
| Feature | Unit Test | Integration Test | Notes |
|---|---|---|---|
| Get<T> (new settings, creates table) | Y | Y | Verifies schema creation |
| Get<T> (existing settings) | Y | Y | Verifies data retrieval |
| Update<T> (existing table) | Y | Y | Verifies delete-then-insert |
| Update<T> (new table) | Y | Y | Verifies table creation |
| Schema evolution: add column | ? | Y | SchemaManager tests |
| Schema evolution: drop column | ? | Y | SchemaManager tests |
| [Encrypted] attribute | Y | Y | Repository-level tests |
| AesEncryptionProvider | -- | Y | End-to-end encryption |
| DataProtectionEncryptionProvider | -- | ? | May need ASP.NET Core host |
| Pub/sub: Subscribe | -- | Y | Dedicated pub/sub tests |
| Pub/sub: Unsubscribe | -- | Y | Dedicated pub/sub tests |
| Pub/sub: Notify on Update | -- | Y | Verifies OldSettings/NewSettings |
| Cache: Get (cache hit) | Y | -- | Moq-based |
| Cache: Get (cache miss) | Y | -- | Falls through to inner manager |
| Cache: Update (evict + persist) | Y | -- | Moq-based |
| Cache: SetCacheValue | Y | -- | Direct cache manipulation |
| Cache: RemoveCacheValue | Y | -- | Cache eviction |
| Feature | Unit Test | Integration Test | Notes |
|---|---|---|---|
| Single settings class | Y | Y | One JSON file |
| Multiple settings classes | -- | Y | Separate JSON files |
| Settings versioning (add property) | Y | -- | Default values |
| Settings versioning (remove property) | Y | -- | Graceful ignore |
| [JsonDescription] comments | Y | -- | Comment injection |
| Concurrent read access | -- | Y | Thread safety |
| Custom file path | Y | Y | FileInfo constructor |
| Default path (CommonApplicationData) | Y | -- | Platform-specific |
Settings data loss on Update
Schema evolution data loss
Encryption round-trip integrity
Pub/sub notification reliability
Cache coherence
Thread safety under concurrent access
ADO.NET provider compatibility
Settings class edge cases
{}Delete-then-insert atomicity -- The Update flow in SettingsRepository deletes the existing row before inserting the new one. Without transaction wrapping, this is a data loss window.
Schema column ordering -- Properties are sorted alphabetically and compared against existing columns (also sorted). If sorting behavior changes across .NET versions, schema evolution could break.
Reflection-based property discovery -- Settings classes are mapped via reflection (typeof(T).GetProperties()). Property ordering from reflection is not guaranteed by the CLR spec, though in practice it matches source order.
JSON file concurrent access -- JsonConnectionEx uses ConcurrentDictionary for type tracking, but the underlying JSON file I/O may not be safe for concurrent writes from multiple processes.
Data Source=:memory: (in-memory, per-connection isolation)Located in test projects:
TestSettings (Id, Name) -- basic two-property modelGeneralSettings, AdoProviderSettings -- more complex modelsModels/NextVersion/ -- versioned models for evolution testingdotnet test --configuration Release)dotnet pack --configuration Release)