Class MockCbmsDataStore
Cache-backed mock data store for CBMS API responses. Seeds from embedded JSON files on first access, indexed by phone number via a manifest file. Supports read (phone lookup) and write (PATCH mutation) operations. Thread safety is provided by HybridCache.
public sealed class MockCbmsDataStore
- Inheritance
-
objectMockCbmsDataStore
Constructors
MockCbmsDataStore(HybridCache)
public MockCbmsDataStore(HybridCache cache)
Parameters
cacheHybridCache
Methods
ApplyPatchAsync(string, CancellationToken)
public Task<string> ApplyPatchAsync(string requestBodyJson, CancellationToken cancellationToken = default)
Parameters
requestBodyJsonstringcancellationTokenCancellationToken
Returns
- Task<string>
GetResponseForPhoneAsync(string, CancellationToken)
public Task<string> GetResponseForPhoneAsync(string normalizedPhone, CancellationToken cancellationToken = default)
Parameters
normalizedPhonestringcancellationTokenCancellationToken
Returns
- Task<string>