public void IgnoreNullReturnsInActions()
        {
            var anon = new AnonymizeEngine(Mode.inplace);
            var th   = new TestHandler(null, null);

            anon.RegisterHandler(th);
            anon.ForceRegisterHandler(th);
        }
        public void CheckThereIsNoGlobalCachedState()
        {
            var anonymizer = new AnonymizeEngine(Mode.inplace);
            var cp         = new ConfidentialityProfile(SecurityProfileOptions.BasicProfile);

            anonymizer.RegisterHandler(cp);

            var ds = new DicomDataset(new DicomUniqueIdentifier(DicomTag.RequestedSOPInstanceUID, "123"));

            anonymizer.Anonymize(ds);
            Assert.AreNotEqual("123", ds.GetSingleValue <string>(DicomTag.RequestedSOPInstanceUID));

            cp = new ConfidentialityProfile(SecurityProfileOptions.BasicProfile | SecurityProfileOptions.RetainUIDs);
            anonymizer.ForceRegisterHandler(cp);

            ds = new DicomDataset(new DicomUniqueIdentifier(DicomTag.RequestedSOPInstanceUID, "123"));

            anonymizer.Anonymize(ds);
            Assert.AreEqual("123", ds.GetSingleValue <string>(DicomTag.RequestedSOPInstanceUID));
        }