public void GivenARequestWithNoFrames_WhenValidated_ThenBadRequestExceptionIsThrown(int[] frames)
        {
            string expectedErrorMessage = "The specified frames value is not valid. At least one frame must be present, and all requested frames must have value greater than 0.";

            var ex = Assert.Throws <BadRequestException>(() => RetrieveRequestValidator.ValidateFrames(frames));

            Assert.Equal(expectedErrorMessage, ex.Message);
        }
 private void ValidateRetrieveResourceRequest(RetrieveResourceRequest request)
 {
     RetrieveRequestValidator.ValidateInstanceIdentifiers(request.ResourceType, request.StudyInstanceUid, request.SeriesInstanceUid, request.SopInstanceUid);
     if (request.ResourceType == ResourceType.Frames)
     {
         RetrieveRequestValidator.ValidateFrames(request.Frames);
     }
 }
 public void GivenARequestWithValidFramesValue_WhenValidated_ThenNoExceptionIsThrown()
 {
     RetrieveRequestValidator.ValidateFrames(new List <int> {
         1
     });
 }