public void DisplaysOneRow_when_SimplestTriangleGiven()
        {
            var inputTriangle = new InputTriangle
            {
                Levels = new int[][]
                {
                    new int[] { 7 }
                }
            };

            var resultPath = new ResultPath {
                Nodes = new List <Node> {
                    new Node {
                        Value = 7
                    }
                }, PathSum = 7, SolvingTime = TimeSpan.FromSeconds(2)
            };

            _sut.Display(inputTriangle, resultPath);

            _consoleWrapperMock.Verify(x => x.Write("  7"), Times.Once);
            _consoleWrapperMock.Verify(x => x.Write(It.Is <string>(y => y.Contains("maximum"))), Times.Once);
            _consoleWrapperMock.Verify(x => x.WriteLine(It.Is <string>(y => y.Contains("quit"))), Times.Once);
        }
        private void TryProceed()
        {
            var inputTriangle = _triangleReader.Read();

            if (!_triangleChecker.Check(inputTriangle, out var error))
            {
                _errorDisplayer.Display(error);
                return;
            }

            var solver = _solverFactory.CreateSolver();

            var startTime = DateTime.Now;

            var resultPath = solver.Solve(inputTriangle);

            resultPath.SolvingTime = DateTime.Now - startTime;

            _resultDisplayer.Display(inputTriangle, resultPath);
        }