public virtual void TestGetAttributeNameValuePairsBooleanFalseBL() { IDictionary <string, string> result = new BlR2PropertyFormatterTest.TestableBlR2PropertyFormatter().GetAttributeNameValuePairsForTest (new Ca.Infoway.Messagebuilder.Marshalling.HL7.Formatter.FormatContextImpl(this.result, null, "name", "BL", null, null, false), false, null); Assert.AreEqual(1, result.Count, "map size"); Assert.IsTrue(this.result.IsValid()); Assert.IsTrue(result.ContainsKey("value"), "key as expected"); Assert.AreEqual("false", result.SafeGet("value"), "value as expected"); }
public virtual void TestGetAttributeNameValuePairsNullValueBL() { IDictionary <string, string> result = new BlR2PropertyFormatterTest.TestableBlR2PropertyFormatter().GetAttributeNameValuePairsForTest (new Ca.Infoway.Messagebuilder.Marshalling.HL7.Formatter.FormatContextImpl(this.result, null, "name", "BL", null, null, false), null, new BLImpl()); // a null value for BL elements results in a nullFlavor attribute Assert.AreEqual(1, result.Count, "map size"); Assert.IsTrue(this.result.IsValid()); Assert.IsTrue(result.ContainsKey("nullFlavor"), "key as expected"); Assert.AreEqual(AbstractPropertyFormatter.NULL_FLAVOR_NO_INFORMATION, result.SafeGet("nullFlavor"), "value as expected"); }