public void SetResult_FirstAcceptThenReject_ClearsAcceptedTransferSyntax() { var context = new DicomPresentationContext(0x07, DicomUID.CTImageStorage); context.SetResult(DicomPresentationContextResult.Accept, DicomTransferSyntax.JPEGProcess1); context.SetResult(DicomPresentationContextResult.RejectTransferSyntaxesNotSupported); Assert.Null(context.AcceptedTransferSyntax); }
public void SetResult_TwoArgumentNotAcceptTransferSyntaxNull_DoesNotThrow() { var context = new DicomPresentationContext(0x03, DicomUID.RTPlanStorage); var exception = Record.Exception(() => context.SetResult(DicomPresentationContextResult.RejectAbstractSyntaxNotSupported, null)); Assert.Null(exception); }
public void SetResult_TwoArgumentAcceptTransferSyntaxNull_Throws() { var context = new DicomPresentationContext(0x03, DicomUID.RTPlanStorage); var exception = Record.Exception(() => context.SetResult(DicomPresentationContextResult.Accept, null)); Assert.IsType <DicomNetworkException>(exception); }
public void SetResult_OneArgumentNotAcceptNoTransferSyntax_DoesNotThrow() { var context = new DicomPresentationContext(0x03, DicomUID.RTPlanStorage); var exception = Record.Exception(() => context.SetResult(DicomPresentationContextResult.RejectNoReason)); Assert.Null(exception); }
public void SetResult_TwoArguments_AcceptedTransferSyntaxOnlyRequiredOnAcceptNullOtherwise( DicomPresentationContextResult result, DicomTransferSyntax acceptedSyntax) { var context = new DicomPresentationContext(0x01, DicomUID.Verification); context.SetResult(result, acceptedSyntax); Assert.Equal(result == DicomPresentationContextResult.Accept ? acceptedSyntax : null, context.AcceptedTransferSyntax); }