Exemplo n.º 1
0
        public void ParseMapCorrectly(string input, int expectedCaveCount, int expectedLargeCaveCount, int expectedSmallCaveCount)
        {
            var sut = PathFinding.CreateWithoutRepetition(input);

            Assert.True(sut.HasExactlyCaves(expectedCaveCount));
            Assert.True(sut.HasExactlyLargeCaves(expectedLargeCaveCount));
            Assert.True(sut.HasExactlySmallCaves(expectedSmallCaveCount));
        }
Exemplo n.º 2
0
        public void SolveFirstPuzzle()
        {
            var sut = PathFinding.CreateWithoutRepetition(REAL_CAVE);

            Assert.Equal(5157, sut.Paths);
        }
Exemplo n.º 3
0
        public void FindAllPathsCorrectly(string map, int expectedPaths)
        {
            var sut = PathFinding.CreateWithoutRepetition(map);

            Assert.Equal(expectedPaths, sut.Paths);
        }
Exemplo n.º 4
0
        public void ThrowException_WhenInitializedWithInvalidData(string invalidData)
        {
            var exception = Assert.Throws <ArgumentException>(() => PathFinding.CreateWithoutRepetition(invalidData));

            Assert.Equal("Invalid data", exception.Message);
        }