コード例 #1
0
        public void GivenAnonymizerTagRule_WhenHandleTheRule_IfRuleIsNotSupportedOnItem_ExceptionWillBeThrown()
        {
            var newRule = new AnonymizerTagRule(DicomTag.PatientName, "perturb", "description", new DicomProcessorFactory(), JObject.Parse("{}"));
            var context = new ProcessContext();

            Assert.Throws <AnonymizerOperationException>(() => newRule.Handle(Dataset, context));
        }
コード例 #2
0
 public AnonymizerTagRuleTests()
 {
     Dataset = new DicomDataset()
     {
         { DicomTag.PatientAge, "100Y" },      // AS
         { DicomTag.PatientName, "TestName" }, // CS
     };
     TagRule = new AnonymizerTagRule(DicomTag.PatientName, "redact", "description", new DicomProcessorFactory(), JObject.Parse("{\"EnablePartialDatesForRedact\" : \"true\"}"));
 }