Пример #1
0
        public void ShallReturnSectionComponent()
        {
            var xml     = XDocument.Load("C-CDA_R2-1_CCD.xml");
            var element = xml.Root.CdaElement("component").CdaElement("structuredBody").CdaElement("component").CdaElement("section");

            var result = new SectionParser().FromXml(element);

            result.Should().NotBeNull();
            // US-Core Shall have title
            result.Title.Should().NotBeNullOrEmpty();
            // US-Core Shall have code
            result.Code?.Coding.Any().Should().BeTrue();
            // Us-Core Shall have text
            result.Text?.Div.Should().NotBeNullOrEmpty();
        }
Пример #2
0
        public void NullElementShallReturnNull()
        {
            var result = new SectionParser().FromXml(null);

            result.Should().BeNull();
        }