public void TestBinaryBoardingStrategy(string input, int expectedRow, int expectedColumn, int expectedSeatID)
        {
            Seat seat = strategy.GetSeat(input);

            Assert.AreEqual(expectedRow, seat.Row);
            Assert.AreEqual(expectedColumn, seat.Column);
            Assert.AreEqual(expectedSeatID, seat.SeatId);
        }
Пример #2
0
 protected override int SolvePartOne()
 {
     return(boardingPasses.Select(bp => strategy.GetSeat(bp)).Max(bp => bp.SeatId));
 }