Example #1
0
        public void GetShortestRoute_ProvideAllParams_ConfirmReturn(string src, string dst)
        {
            string result;

            result = DAL.Read(src, dst);
            Assert.IsType <string>(result);
            Assert.True(result == "Success");
        }
Example #2
0
        public string GetShortestRoute(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.Read(src, dst));
            }
            catch (Exception exception)
            {
                return($"{exception.Message} {exception.Source} {exception.StackTrace}");
            }
        }