Пример #1
0
    public void Test1(string input, string expected)
    {
        var seafloor = Seafloor.Parse(input, default);

        seafloor.Increment();
        Assert.Equal(Seafloor.Parse(expected, default), seafloor);
    }
Пример #2
0
    public void Test2(string input, int steps, int expectedFlashCount)
    {
        var seafloor = Seafloor.Parse(input, default);

        while (steps-- > 0)
        {
            seafloor.Increment();
        }
        Assert.Equal(expectedFlashCount, seafloor.FlashCount);
    }
Пример #3
0
    public void Test3(string input, int expected)
    {
        var actual   = 0;
        var seafloor = Seafloor.Parse(input, default);

        do
        {
            actual++;
            seafloor.Increment();
        }while (seafloor.Values.Any(i => i > 0));
        Assert.Equal(expected, actual);
    }