Exemplo n.º 1
0
 public void ConvertToLongDateWithSecond()
 {
     DateTime checkDate = DateTime.Now;
     ACK ack = new ACK();
     ack.MSH.DateTimeOfMessage.TimeOfAnEvent.SetLongDateWithSecond(checkDate);
     Assert.AreEqual(ack.MSH.DateTimeOfMessage.TimeOfAnEvent.Value, checkDate.ToString("yyyyMMddHHmmss"));
 }
Exemplo n.º 2
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"));
 }
Exemplo n.º 3
0
        public void ConvertBackToShortDate()
        {
            DateTime checkDate = DateTime.Now;
            ACK ack = new ACK();
            ack.MSH.DateTimeOfMessage.TimeOfAnEvent.SetShortDate(checkDate);

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

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