Example #1
0
 public void String8_FromTimeSpan()
 {
     byte[] buffer = new byte[21];
     Assert.AreEqual("00:00:00", String8.FromTimeSpan(TimeSpan.Zero, buffer).ToString());
     Assert.AreEqual("1.00:00:00", String8.FromTimeSpan(TimeSpan.Parse("1.00:00:00"), buffer).ToString());
     Assert.AreEqual("1.09:08:07", String8.FromTimeSpan(TimeSpan.Parse("1.09:08:07"), buffer).ToString());
     Assert.AreEqual("09:08:07.654", String8.FromTimeSpan(TimeSpan.Parse("09:08:07.654"), buffer).ToString());
     Assert.AreEqual("10675199.02:48:05.477", String8.FromTimeSpan(TimeSpan.MaxValue, buffer).ToString());
 }