public void Part1() { var busSchedule = new BusSchedule(_input[1]); var timestamp = int.Parse(_input[0]); var nextDeparture = busSchedule.GetNextDeparture(timestamp); var answer = (nextDeparture.Timestamp - timestamp) * nextDeparture.Bus; TestContext.WriteLine($"Answer = {answer}"); }
public void Part1WithTestData() { var busSchedule = new BusSchedule(_testData[1]); var timestamp = int.Parse(_testData[0]); var nextDeparture = busSchedule.GetNextDeparture(timestamp); var answer = (nextDeparture.Timestamp - timestamp) * nextDeparture.Bus; answer.ShouldBe(295); }