Esempio n. 1
0
        public void GetShortestPath_ProvideAllParams_ConfirmReturn(string src, string dst)
        {
            string result;

            result = DAL.ReadGraph(src, dst);
            Assert.IsType <string>(result);
            Assert.True(result == "Success");
        }
Esempio n. 2
0
        public string GetShortestPath(string src, string dst)
        {
            try
            {
                if (ValidationHandler.Run(ValidatorStore.Match, src, dst))
                {
                    return(MessageHandler.GetMessage(MessageLabels.SrcDstMatchFailure));
                }
                ;
                if (!ValidationHandler.Run(ValidatorStore.Code3Validation, src, dst))
                {
                    return(MessageHandler.GetMessage(MessageLabels.Code3FormatError));
                }

                src = TransformationHandler.Run(TransformationStore.ToUpper, src);
                dst = TransformationHandler.Run(TransformationStore.ToUpper, dst);

                return(GL_DAL.ReadGraph(src, dst));
            }
            catch (Exception exception)
            {
                return($"{exception.Message} {exception.Source} {exception.StackTrace}");
            }
        }