public static DateTime DateTime(DateTime from, DateTime to) { TimeSpan timeSpan = to - from; DateTime dateTime = from.AddDays((double)NumberFaker.Number(1, (int)timeSpan.TotalDays - 1)); return(dateTime.AddSeconds((double)NumberFaker.Number(1, 86400))); }
public static string SelectFrom(int numElements, string characters) { StringBuilder stringBuilder = new StringBuilder(); int length = characters.Length; while (numElements > 0) { stringBuilder.Append(characters[NumberFaker.Number(length)]); numElements--; } return(stringBuilder.ToString()); }
public static EnumT SelectFrom <EnumT>() { Array values = Enum.GetValues(typeof(EnumT)); return((EnumT)values.GetValue(NumberFaker.Number(values.Length))); }