コード例 #1
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}");
            }
        }
コード例 #2
0
 public override string GetMessage(MessageLabels label)
 {
     return(Messages.GetMessage(label));
 }
コード例 #3
0
 public void MessagesEnglish_GetMessage_ConfirmReturn(MessageLabels label, string msg)
 {
     output.WriteLine($"{label} {msg}");
     Assert.True(Messages.GetMessage(label) == msg);
 }