コード例 #1
0
    public static void Y2018_Day07_Assemble_Returns_Correct_Solution(
        int workers,
        int partDuration,
        string expectedOrder,
        int expectedTime)
    {
        // Arrange
        string[] instructions =
        {
            "Step C must be finished before step A can begin.",
            "Step C must be finished before step F can begin.",
            "Step A must be finished before step B can begin.",
            "Step A must be finished before step D can begin.",
            "Step B must be finished before step E can begin.",
            "Step D must be finished before step E can begin.",
            "Step F must be finished before step E can begin.",
        };

        // Act
        (string actualOrder, int actualTime) = Day07.Assemble(instructions, partDuration, workers);

        // Assert
        actualOrder.ShouldBe(expectedOrder);
        actualTime.ShouldBe(expectedTime);
    }