Beispiel #1
0
        public async Task GivenAnIncorrectAcceptHeader_WhenRetrievingResource_ThenNotAcceptableIsReturned(string acceptHeader)
        {
            // Study
            await _client.ValidateResponseStatusCodeAsync(
                string.Format(DicomWebConstants.BaseRetrieveStudyMetadataUriFormat, Guid.NewGuid().ToString()),
                acceptHeader,
                HttpStatusCode.NotAcceptable);

            // Series
            await _client.ValidateResponseStatusCodeAsync(
                string.Format(DicomWebConstants.BaseRetrieveSeriesMetadataUriFormat, Guid.NewGuid().ToString(), Guid.NewGuid().ToString()),
                acceptHeader,
                HttpStatusCode.NotAcceptable);

            // Instance
            await _client.ValidateResponseStatusCodeAsync(
                string.Format(DicomWebConstants.BaseRetrieveInstanceMetadataUriFormat, Guid.NewGuid().ToString(), Guid.NewGuid().ToString(), Guid.NewGuid().ToString()),
                acceptHeader,
                HttpStatusCode.NotAcceptable);
        }
        public async Task GivenAnIncorrectAcceptHeader_WhenRetrievingResource_NotAcceptableIsReturned(string acceptHeader)
        {
            // Study
            await _client.ValidateResponseStatusCodeAsync(
                string.Format(DicomWebConstants.BasStudyUriFormat, TestUidGenerator.Generate()),
                acceptHeader,
                HttpStatusCode.NotAcceptable);

            // Series
            await _client.ValidateResponseStatusCodeAsync(
                string.Format(DicomWebConstants.BaseSeriesUriFormat, TestUidGenerator.Generate(), TestUidGenerator.Generate()),
                acceptHeader,
                HttpStatusCode.NotAcceptable);

            // Instance
            await _client.ValidateResponseStatusCodeAsync(
                string.Format(DicomWebConstants.BaseInstanceUriFormat, TestUidGenerator.Generate(), TestUidGenerator.Generate(), TestUidGenerator.Generate()),
                acceptHeader,
                HttpStatusCode.NotAcceptable);
        }