Beispiel #1
0
 public RetrieveResourceServiceTests(DataStoreTestsFixture blobStorageFixture, SqlDataStoreTestsFixture sqlIndexStorageFixture)
 {
     _indexDataStore                = sqlIndexStorageFixture.IndexDataStore;
     _instanceStore                 = sqlIndexStorageFixture.InstanceStore;
     _fileStore                     = blobStorageFixture.FileStore;
     _retrieveTranscoder            = Substitute.For <ITranscoder>();
     _frameHandler                  = Substitute.For <IFrameHandler>();
     _retrieveTransferSyntaxHandler = new RetrieveTransferSyntaxHandler(NullLogger <RetrieveTransferSyntaxHandler> .Instance);
     _recyclableMemoryStreamManager = blobStorageFixture.RecyclableMemoryStreamManager;
     _retrieveResourceService       = new RetrieveResourceService(
         _instanceStore, _fileStore, _retrieveTranscoder, _frameHandler, _retrieveTransferSyntaxHandler, blobStorageFixture.RecyclableMemoryStreamManager, NullLogger <RetrieveResourceService> .Instance);
 }
        public RetrieveResourceServiceTests(DataStoreTestsFixture blobStorageFixture, SqlDataStoreTestsFixture sqlIndexStorageFixture)
        {
            EnsureArg.IsNotNull(sqlIndexStorageFixture, nameof(sqlIndexStorageFixture));
            EnsureArg.IsNotNull(blobStorageFixture, nameof(blobStorageFixture));
            _instanceStore      = sqlIndexStorageFixture.InstanceStore;
            _indexDataStore     = sqlIndexStorageFixture.IndexDataStore;
            _fileStore          = blobStorageFixture.FileStore;
            _retrieveTranscoder = Substitute.For <ITranscoder>();
            _frameHandler       = Substitute.For <IFrameHandler>();

            _dicomRequestContextAccessor = Substitute.For <IDicomRequestContextAccessor>();
            _dicomRequestContextAccessor.RequestContext.DataPartitionEntry = new PartitionEntry(DefaultPartition.Key, DefaultPartition.Name);

            _retrieveTransferSyntaxHandler = new RetrieveTransferSyntaxHandler(NullLogger <RetrieveTransferSyntaxHandler> .Instance);
            _recyclableMemoryStreamManager = blobStorageFixture.RecyclableMemoryStreamManager;
            _retrieveResourceService       = new RetrieveResourceService(
                _instanceStore, _fileStore, _retrieveTranscoder, _frameHandler, _retrieveTransferSyntaxHandler, _dicomRequestContextAccessor, NullLogger <RetrieveResourceService> .Instance);
        }