Fix nullable fields in Astra connector for test compatibility
Make SourceFetchService and RawDocumentStorage fields nullable to allow testing with null values, matching constructor parameter signatures. Tests now: 14 passed, 0 failed
This commit is contained in:
@@ -41,8 +41,8 @@ namespace StellaOps.Concelier.Connector.Astra;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed class AstraConnector : IFeedConnector
|
public sealed class AstraConnector : IFeedConnector
|
||||||
{
|
{
|
||||||
private readonly SourceFetchService _fetchService;
|
private readonly SourceFetchService? _fetchService;
|
||||||
private readonly RawDocumentStorage _rawDocumentStorage;
|
private readonly RawDocumentStorage? _rawDocumentStorage;
|
||||||
private readonly IDocumentStore _documentStore;
|
private readonly IDocumentStore _documentStore;
|
||||||
private readonly IDtoStore _dtoStore;
|
private readonly IDtoStore _dtoStore;
|
||||||
private readonly IAdvisoryStore _advisoryStore;
|
private readonly IAdvisoryStore _advisoryStore;
|
||||||
@@ -63,8 +63,8 @@ public sealed class AstraConnector : IFeedConnector
|
|||||||
ILogger<AstraConnector> logger)
|
ILogger<AstraConnector> logger)
|
||||||
{
|
{
|
||||||
// fetchService and rawDocumentStorage are nullable for testing stub implementations
|
// fetchService and rawDocumentStorage are nullable for testing stub implementations
|
||||||
_fetchService = fetchService!;
|
_fetchService = fetchService;
|
||||||
_rawDocumentStorage = rawDocumentStorage!;
|
_rawDocumentStorage = rawDocumentStorage;
|
||||||
_documentStore = documentStore ?? throw new ArgumentNullException(nameof(documentStore));
|
_documentStore = documentStore ?? throw new ArgumentNullException(nameof(documentStore));
|
||||||
_dtoStore = dtoStore ?? throw new ArgumentNullException(nameof(dtoStore));
|
_dtoStore = dtoStore ?? throw new ArgumentNullException(nameof(dtoStore));
|
||||||
_advisoryStore = advisoryStore ?? throw new ArgumentNullException(nameof(advisoryStore));
|
_advisoryStore = advisoryStore ?? throw new ArgumentNullException(nameof(advisoryStore));
|
||||||
|
|||||||
Reference in New Issue
Block a user