public ReleaseController(IHostingEnvironment he, IConfiguration configuration) { this.he = he; mapper = new ReleaseMapper(LogicFactory.CreateTimeCalculationLogic()); releaseLogic = LogicFactory.CreateReleaseLogic(); commentLogic = LogicFactory.CreateCommentLogic(); timeLogic = LogicFactory.CreateTimeCalculationLogic(); }
public void CalculateTimeUntilRelease(string start, string end, string expected) { DateTime startDate; DateTime endDate; DateTime.TryParse(start, out startDate); DateTime.TryParse(end, out endDate); TimeCalculationLogic tc = new TimeCalculationLogic(); ChangeDateModel changeDateModel = new ChangeDateModel { Date = endDate.ToShortDateString() }; ChangeDateModel[] input = { changeDateModel }; tc.ConvertToDaysIfValidDate(startDate, input); Assert.Equal(expected, input[0].Date); }
public TimeCalculations() { tc = new TimeCalculationLogic(); }
public ReleaseMapper(TimeCalculationLogic timeLogic) { this.timeLogic = timeLogic; }