public void LogMessageMobile_GetDateTimeFormatsValueToVerify_ShouldReturnListString() { var reportTime = "12:00:00"; _log.reportedTime = reportTime; var formatToVerify = _log.GetDateTimeFormatsValueToVerify(); Assert.IsInstanceOf <List <string> >(formatToVerify); Assert.IsTrue(formatToVerify.Count > 0); Assert.AreEqual(reportTime, formatToVerify[0]); }
public void ValidateLogMobileMessageDateTimeFormats(LogMessageMobile logMessageMobile) { IList <string> elements = logMessageMobile.GetDateTimeFormatsValueToVerify(); foreach (var element in elements) { if (!IsValidDateTimeFormat(element)) { throw new JsonException("Invalid datetime format"); } } }