public void CanFindMyBestSleeper() { var input = Inputs.Day4.Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries); var results = Day4.FindBestSleeper(input); Assert.Equal(1523, results.Id); Assert.Equal(483, results.MinuteSlept); }
public void CanFindBestSleeper() { var input = new[] { "[1518-11-02 00:00] Guard #14 begins shift", "[1518-11-01 00:05] falls asleep", "[1518-11-02 00:50] wakes up", "[1518-11-01 00:00] Guard #10 begins shift", "[1518-11-01 00:50] wakes up", "[1518-11-02 00:05] falls asleep", "[1518-11-05 00:00] Guard #10 begins shift", "[1518-11-05 00:50] wakes up", "[1518-11-05 00:05] falls asleep", }; var results = Day4.FindBestSleeper(input); Assert.Equal(10, results.Id); Assert.Equal(90, results.MinuteSlept); }