public void ShortestPathBinaryMatrix(List <int[]> input, int expected)
        {
            var sut    = new ShortestPathInBinaryMatrix();
            var actual = sut.ShortestPathBinaryMatrix(input.ToArray());

            Assert.AreEqual(expected, actual);
        }
        public void ShortestPathInBinaryMatrixTest()
        {
            var shortestPathInBinaryMatrix = new ShortestPathInBinaryMatrix();

            int[][] mat      = new[] { new[] { 0, 0, 0 }, new int[] { 1, 1, 0 }, new int[] { 1, 1, 0 } };
            var     actual   = shortestPathInBinaryMatrix.ShortestPathBinaryMatrix(mat);
            var     expected = 4;

            Assert.That(actual, Is.EqualTo(expected));
        }
コード例 #3
0
 public void BeforeEach()
 {
     ShortestPathInBinaryMatrix = new ShortestPathInBinaryMatrix();
 }