示例#1
0
        public virtual void ShouldReturnProxyForUnsupportedVocabInLenientMode()
        {
            CdaCodeResolver lenientFixture = new CdaCodeResolver(new TypedCodeFactory(), Ca.Infoway.Messagebuilder.Platform.ResourceLoader.GetResource
                                                                     (typeof(CdaCodeResolverTest), "/voc.xml"), Ca.Infoway.Messagebuilder.Platform.ResourceLoader.GetResource(typeof(CdaCodeResolverTest
                                                                                                                                                                                     ), "/vocabNameMap.xml"), CdaCodeResolver.MODE_LENIENT);
            // unsupported code in known value set still returns null
            BasicConfidentialityKind confidentialityCode = lenientFixture.Lookup <BasicConfidentialityKind>(TYPE, "XXX", "2.16.840.1.113883.5.25"
                                                                                                            );

            Assert.IsNull(confidentialityCode);
            // unsupported value set delegates to proxy strategy
            ActClass actClassCode = lenientFixture.Lookup <ActClass>(typeof(ActClass), "OBS", "2.16.840.1.113883.5.6");

            Assert.IsNotNull(actClassCode);
            Assert.AreEqual("OBS", actClassCode.CodeValue);
            Assert.AreEqual("2.16.840.1.113883.5.6", actClassCode.CodeSystem);
        }
示例#2
0
 public virtual void SetUp()
 {
     fixture = new CdaCodeResolver(new TypedCodeFactory(), Ca.Infoway.Messagebuilder.Platform.ResourceLoader.GetResource(typeof(
                                                                                                                             CdaCodeResolverTest), "/voc.xml"), Ca.Infoway.Messagebuilder.Platform.ResourceLoader.GetResource(typeof(CdaCodeResolverTest
                                                                                                                                                                                                                                     ), "/vocabNameMap.xml"));
 }