public AltinnDownloaderServiceMock() { var item = new ArchivedItemMetadata(archiveReference: $"AR{new Random().Next(1000, 4999)}" , archivedDate: DateTime.Now , reporteeId: "" , reporteeType: "Person" , serviceCode: "2222" , serviceEditionCode: 1); _list.Add(item); }
public async Task TestAddToFtBMetadataQueueWithMoq() { ILoggerFactory loggerFactory = new LoggerFactory(); var metadataItem = new ArchivedItemMetadata(archiveReference: $"AR{new Random().Next(5000, 9999)}" , archivedDate: DateTime.Now , reporteeId: "" , reporteeType: "Person" , serviceCode: "7777" , serviceEditionCode: 1); var metaDataItemList = new List <IArchivedItemMetadata>() { metadataItem }; var altinnDownloaderServiceMock = new Mock <IAltinnDownloaderService>(); altinnDownloaderServiceMock.Setup(x => x.DownloadMetadata()).Returns(metaDataItemList); var logger = new Logger <AltinnMetadataItemsProcessor>(loggerFactory); AltinnMetadataItemsProcessor processor = new AltinnMetadataItemsProcessor(altinnDownloaderServiceMock.Object, _queueClient, logger); await processor.EnqueueMetadataFromAltinnDownloadQueue(); }