public virtual void TestNullable() { Interval <PlatformDate> interval = IntervalFactory.CreateWidth <PlatformDate>(new DateDiff(Ca.Infoway.Messagebuilder.Domainvalue.Nullflavor.NullFlavor .OTHER)); string result = new IvlTsPropertyFormatter().Format(GetContext("name"), new IVLImpl <QTY <PlatformDate>, Interval <PlatformDate > >(interval)); AssertXml("result", "<name><width nullFlavor=\"OTH\"/></name>", result); }
public virtual void TestCustomUnit() { Interval <PlatformDate> interval = IntervalFactory.CreateWidth <PlatformDate>(new DateDiff(1, IvlTsFullDateTimePropertyFormatterTest.CustomUnit .SANDWICH)); string result = new IvlTsPropertyFormatter().Format(GetContext("name"), new IVLImpl <QTY <PlatformDate>, Interval <PlatformDate > >(interval)); AssertXml("result", "<name><width unit=\"SANDWICH\" value=\"1\"/></name>", result); }
public virtual void TestBasicAbstract() { TimeZoneInfo timeZone = TimeZoneUtil.GetTimeZone("America/Toronto"); Interval <PlatformDate> interval = IntervalFactory.CreateLowHigh <PlatformDate>(DateUtil.GetDate(2006, 11, 25, 11, 12, 13, 0, timeZone), DateUtil.GetDate(2007, 0, 2, 10, 11, 12, 0, timeZone)); IVLImpl <QTY <PlatformDate>, Interval <PlatformDate> > hl7DataType = new IVLImpl <QTY <PlatformDate>, Interval <PlatformDate> >(interval ); hl7DataType.DataType = StandardDataType.IVL_FULL_DATE_TIME; string result = new IvlTsPropertyFormatter().Format(new Ca.Infoway.Messagebuilder.Marshalling.HL7.Formatter.FormatContextImpl (this.result, null, "name", "IVL<TS.FULLDATEWITHTIME>", Ca.Infoway.Messagebuilder.Xml.ConformanceLevel.POPULATED, null, false, SpecificationVersion.V02R02, timeZone, timeZone, null, false), hl7DataType); Assert.IsTrue(this.result.IsValid()); AssertXml("result", "<name specializationType=\"IVL_TS.FULLDATETIME\" xsi:type=\"IVL_TS\"><low value=\"20061225111213.0000-0500\"/><high value=\"20070102101112.0000-0500\"/></name>" , result); }
public virtual void SetUp() { this.formatter = new IvlTsPropertyFormatter(); }