public void Can_Get_Type_Description(WorkflowType type, int?days, string expected) { DateTime?date = null; if (days.HasValue) { date = DateTime.Now.AddDays(days.Value); } string description = type.Description(date); Assert.StartsWith(expected, description); }
public static string DescriptionPastTense(this WorkflowType type, DateTime?scheduledDate) { return(type.Description(scheduledDate).Replace("ish", "ished").Replace("dule", "duled").Replace("for", "to be")); }