Пример #1
0
        public void TestApplySeatingPartOne()
        {
            var state0      = LoadInput("input_1_state_0.txt");
            var state1      = LoadInput("input_1_state_1.txt");
            var state2      = LoadInput("input_1_state_2.txt");
            var state3      = LoadInput("input_1_state_3.txt");
            var state4      = LoadInput("input_1_state_4.txt");
            var state5      = LoadInput("input_1_state_5.txt");
            var waitingArea = new WaitingArea(state0);

            waitingArea.State.ShouldBe(state0);
            waitingArea.ApplySeatingPartOne(); // Round 1
            waitingArea.State.ShouldBe(state1);
            waitingArea.ApplySeatingPartOne(); // Round 2
            waitingArea.State.ShouldBe(state2);
            waitingArea.ApplySeatingPartOne(); // Round 3
            waitingArea.State.ShouldBe(state3);
            waitingArea.ApplySeatingPartOne(); // Round 4
            waitingArea.State.ShouldBe(state4);
            waitingArea.ApplySeatingPartOne(); // Round 5
            waitingArea.State.ShouldBe(state5);
            waitingArea.SeatsTaken.ShouldBe(37);
        }