Beispiel #1
0
		public void ConvertToShortDate()
		{
			DateTime checkDate = DateTime.Now;
			ACK ack = new ACK();
			ack.MSH.DateTimeOfMessage.TimeOfAnEvent.SetShortDate(checkDate);
			Assert.AreEqual(ack.MSH.DateTimeOfMessage.TimeOfAnEvent.Value, checkDate.ToString("yyyyMMdd"));
		}
Beispiel #2
0
		public void ConvertToLongDateWithFractionOfSecond()
		{
			DateTime checkDate = DateTime.Now;
			ACK ack = new ACK();
			ack.MSH.DateTimeOfMessage.TimeOfAnEvent.SetLongDateWithFractionOfSecond(checkDate);
			Assert.AreEqual(ack.MSH.DateTimeOfMessage.TimeOfAnEvent.Value, checkDate.ToString("yyyyMMddHHmmss.FFFF"));
		}
Beispiel #3
0
		public void ConvertBackToLongDate()
		{
			DateTime checkDate = DateTime.Now;
			ACK ack = new ACK();
			ack.MSH.DateTimeOfMessage.TimeOfAnEvent.SetLongDate(checkDate);

			DateTime checkDate2 = ack.MSH.DateTimeOfMessage.TimeOfAnEvent.GetAsDate();

			Assert.AreEqual(checkDate.ToLongDateString(), checkDate2.ToLongDateString());
		}