public void Day4_Part2_Valid() { // Arrange var testInput = new List <string> { "abcde fghij" }; // Act var result = _itemUnderTest.SolvePart2(testInput); // Assert Assert.AreEqual(1, result); }
public void Huh() { var subject = new Day4Solution(); subject.SolvePart2(new List <Day4Solution.GuardLog> { new Day4Solution.GuardLog { Event = Day4Solution.EventType.BeginShift, Timestamp = new DateTime(1518, 11, 1, 0, 0, 0), Id = 10 }, new Day4Solution.GuardLog { Event = Day4Solution.EventType.FallsAsleep, Timestamp = new DateTime(1518, 11, 1, 0, 5, 0) }, new Day4Solution.GuardLog { Event = Day4Solution.EventType.WakesUp, Timestamp = new DateTime(1518, 11, 1, 0, 25, 0) }, new Day4Solution.GuardLog { Event = Day4Solution.EventType.FallsAsleep, Timestamp = new DateTime(1518, 11, 1, 0, 30, 0) }, new Day4Solution.GuardLog { Event = Day4Solution.EventType.WakesUp, Timestamp = new DateTime(1518, 11, 1, 0, 55, 0) }, new Day4Solution.GuardLog { Event = Day4Solution.EventType.BeginShift, Timestamp = new DateTime(1518, 11, 1, 23, 58, 0), Id = 99 }, new Day4Solution.GuardLog { Event = Day4Solution.EventType.FallsAsleep, Timestamp = new DateTime(1518, 11, 2, 0, 40, 0) }, new Day4Solution.GuardLog { Event = Day4Solution.EventType.WakesUp, Timestamp = new DateTime(1518, 11, 2, 0, 50, 0) }, new Day4Solution.GuardLog { Event = Day4Solution.EventType.BeginShift, Timestamp = new DateTime(1518, 11, 3, 0, 5, 0), Id = 10 }, new Day4Solution.GuardLog { Event = Day4Solution.EventType.FallsAsleep, Timestamp = new DateTime(1518, 11, 3, 0, 24, 0) }, new Day4Solution.GuardLog { Event = Day4Solution.EventType.WakesUp, Timestamp = new DateTime(1518, 11, 3, 0, 29, 0) }, new Day4Solution.GuardLog { Event = Day4Solution.EventType.BeginShift, Timestamp = new DateTime(1518, 11, 4, 0, 2, 0), Id = 99 }, new Day4Solution.GuardLog { Event = Day4Solution.EventType.FallsAsleep, Timestamp = new DateTime(1518, 11, 4, 0, 36, 0) }, new Day4Solution.GuardLog { Event = Day4Solution.EventType.WakesUp, Timestamp = new DateTime(1518, 11, 4, 0, 46, 0) }, new Day4Solution.GuardLog { Event = Day4Solution.EventType.BeginShift, Timestamp = new DateTime(1518, 11, 5, 0, 3, 0), Id = 99 }, new Day4Solution.GuardLog { Event = Day4Solution.EventType.FallsAsleep, Timestamp = new DateTime(1518, 11, 5, 0, 45, 0) }, new Day4Solution.GuardLog { Event = Day4Solution.EventType.WakesUp, Timestamp = new DateTime(1518, 11, 5, 0, 55, 0) }, }).Should().Be(4455); }