Пример #1
0
        public StoreScpTest(DicomAdapterFixture dicomAdapterFixture, ScpTestFileSetsFixture testFileSetsFixture)
        {
            _dicomAdapterFixture = dicomAdapterFixture;
            _testFileSetsFixture = testFileSetsFixture;

            _dicomAdapterFixture.ResetMocks();
        }
Пример #2
0
        public StoreScuTest(DicomAdapterFixture fixture, ScuTestFileSetsFixture testFiles)
        {
            _dicomAdapterFixture = fixture;
            _testFileFixture     = testFiles;
            _downloadCount       = 0;
            _failedCount         = 0;
            _succeededCount      = 0;

            _dicomAdapterFixture.Payloads.Reset();
            _dicomAdapterFixture.Payloads.Setup(p => p.Download(It.IsAny <string>(), It.IsAny <string>()))
            .Callback(() =>
            {
                _downloadCount++;
            })
            .ReturnsAsync((string payloadId, string path) =>
                          new API.PayloadFile
            {
                Data = File.ReadAllBytes(path)
            });

            _dicomAdapterFixture.Jobs.Reset();
            _dicomAdapterFixture.ResultsService.Reset();
            _dicomAdapterFixture.ResultsService.Setup(p => p.ReportFailure(It.IsAny <Guid>(), It.IsAny <bool>(), It.IsAny <CancellationToken>()))
            .Callback((() =>
            {
                _failedCount++;
            }));
            _dicomAdapterFixture.ResultsService.Setup(p => p.ReportSuccess(It.IsAny <Guid>(), It.IsAny <CancellationToken>()))
            .Callback((() =>
            {
                _succeededCount++;
            }));
        }
Пример #3
0
 public CEchoTest(DicomAdapterFixture fixture)
 {
     Fixture = fixture;
 }