Exemple #1
0
        public virtual void TestGetAttributeNameValuePairsWithoutCodeSystem()
        {
            IDictionary <string, string> result = new CsPropertyFormatterTest.TestableCsPropertyFormatter().GetAttributeNameValuePairsForTest
                                                      (new Ca.Infoway.Messagebuilder.Marshalling.HL7.Formatter.FormatContextImpl(new ModelToXmlResult(), null, "name", null, null
                                                                                                                                 , null, false), new MockCodeImpl("fred", "The Flintstones"), null);

            Assert.AreEqual(1, result.Count, "map size");
            Assert.IsFalse(result.ContainsKey("codeSystem"), "key as expected");
        }
Exemple #2
0
        public virtual void TestGetAttributeNameValuePairsEnum()
        {
            // used as expected: an enumerated object is passed in
            IDictionary <string, string> result = new CsPropertyFormatterTest.TestableCsPropertyFormatter().GetAttributeNameValuePairsForTest
                                                      (new Ca.Infoway.Messagebuilder.Marshalling.HL7.Formatter.FormatContextImpl(new ModelToXmlResult(), null, "name", null, null
                                                                                                                                 , null, false), CeRxDomainTestValues.CENTIMETRE, null);

            Assert.AreEqual(1, result.Count, "map size");
            Assert.IsTrue(result.ContainsKey("code"), "key as expected");
            Assert.AreEqual("cm", result.SafeGet("code"), "value as expected");
        }