private void UnregisterUnregistersTransferSyntax()
        {
            var uid = new DicomUID("0", "testing", DicomUidType.TransferSyntax);

            DicomTransferSyntax.Register(uid);
            Assert.NotNull(DicomTransferSyntax.Query(uid));

            DicomTransferSyntax.Unregister(uid);
            Assert.Null(DicomTransferSyntax.Query(uid));
        }
        private void RegisterHandlesMultipleRegistrations()
        {
            var uid = new DicomUID("0", "testing", DicomUidType.TransferSyntax);

            //  should not matter if 2 instances are same.
            Assert.NotNull(DicomTransferSyntax.Register(uid));
            Assert.NotNull(DicomTransferSyntax.Register(uid));

            //  just to be sure
            DicomTransferSyntax.Unregister(uid);
        }
        private void QueryReturnsRegisteredTransferSyntax()
        {
            var uid = new DicomUID("0", "testing", DicomUidType.TransferSyntax);

            DicomTransferSyntax.Register(uid);

            var ts = DicomTransferSyntax.Query(uid);

            Assert.NotNull(ts);
            Assert.Equal(uid, ts.UID);

            DicomTransferSyntax.Unregister(uid);
        }
        private void UnregisterHandleMultipleUnregistrations()
        {
            var uid = new DicomUID("0", "testing", DicomUidType.TransferSyntax);

            DicomTransferSyntax.Register(uid);
            Assert.NotNull(DicomTransferSyntax.Query(uid));

            Assert.True(DicomTransferSyntax.Unregister(uid));
            Assert.Null(DicomTransferSyntax.Query(uid));

            Assert.False(DicomTransferSyntax.Unregister(uid));
            Assert.Null(DicomTransferSyntax.Query(uid));
        }
        private void RegisterRegistersTransferSyntax()
        {
            var uid = new DicomUID("0", "testing", DicomUidType.TransferSyntax);

            Assert.Null(DicomTransferSyntax.Query(uid));

            var ts1 = DicomTransferSyntax.Register(uid);

            Assert.NotNull(ts1);

            var ts2 = DicomTransferSyntax.Query(uid);

            Assert.Equal(uid, ts2.UID);

            DicomTransferSyntax.Unregister(uid);
        }