public void TestConvertTime() { string testTime = "20151006213456789"; DateTime dateTime = DateTime.ParseExact(testTime, "yyyyMMddHHmmssfff", System.Globalization.CultureInfo.InvariantCulture); Assert.That(_uut.ConvertTime(testTime), Is.EqualTo(dateTime)); }