public void ValidationHandler_RunDelegate_ConfirmTrueReturn() { bool mockDelegate(string a, string b) { return(true); } Assert.True(ValidationHandler.Run(mockDelegate, "a", "b")); }
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}"); } }