Пример #1
0
        public void WildCard()
        {
            var sops = new SimpleDICOMStorageService.Configuration.SOPClassSet()
            {
                Name  = "all",
                Rules = new System.Collections.Generic.List <SimpleDICOMStorageService.Configuration.SOPClass>()
                {
                    new SimpleDICOMStorageService.Configuration.SOPClass()
                    {
                        Uid = "*"
                    }
                }
            };

            var result   = PresentationContextManager.FindMatchingSOPS(sops);
            var expected = PresentationContextManager.AllSopClasses;

            expected.Add(SopClass.VerificationSopClass);

            Assert.IsTrue(result.TrueForAll(t => expected.Exists(s => s.Name == t.Name)));
        }
Пример #2
0
        public void PartialWildCard()
        {
            var sops = new SimpleDICOMStorageService.Configuration.SOPClassSet()
            {
                Name  = "all",
                Rules = new System.Collections.Generic.List <SimpleDICOMStorageService.Configuration.SOPClass>()
                {
                    new SimpleDICOMStorageService.Configuration.SOPClass()
                    {
                        Uid = "1.2.840.10008.5.1.4.1.1.11.*"
                    }
                }
            };

            var result   = PresentationContextManager.FindMatchingSOPS(sops);
            var expected = new List <SopClass>();

            expected.Add(SopClass.VerificationSopClass);
            expected.Add(SopClass.GrayscaleSoftcopyPresentationStateStorageSopClass);
            expected.Add(SopClass.BlendingSoftcopyPresentationStateStorageSopClass);

            Assert.IsTrue(result.TrueForAll(t => expected.Exists(s => s.Name == t.Name)));
        }