예제 #1
0
 public void xgtime()
 {
     DateTime dt = DateTime.Now;
     TimeSpan ts = dt.TimeOfDay;
     XGTimeConverter  c = new XGTimeConverter();
     byte[] bs = c.ConvertToBytes(ts);
     TimeSpan ts2 = (TimeSpan)c.ConvertToObject(bs);
     int i1 = (int)ts.TotalSeconds;
     int i2 = (int)ts2.TotalSeconds;
     Assert.AreEqual(i1,i2);
 }
예제 #2
0
        public void xgtime()
        {
            DateTime        dt = DateTime.Now;
            TimeSpan        ts = dt.TimeOfDay;
            XGTimeConverter c  = new XGTimeConverter();

            byte[]   bs  = c.ConvertToBytes(ts);
            TimeSpan ts2 = (TimeSpan)c.ConvertToObject(bs);
            int      i1  = (int)ts.TotalSeconds;
            int      i2  = (int)ts2.TotalSeconds;

            Assert.AreEqual(i1, i2);
        }