public void HyperLinkShouldReturnLastArgIfTwoArgsAreSupplied() { var func = new Hyperlink(); var result = func.Execute(FunctionsHelper.CreateArgs("http://epplus.codeplex.com", "EPPlus"), _parsingContext); Assert.AreEqual("EPPlus", result.Result); }
public void HyperLinkShouldReturnArgIfOneArgIsSupplied() { var func = new Hyperlink(); var result = func.Execute(FunctionsHelper.CreateArgs("http://epplus.codeplex.com"), this.ParsingContext); Assert.AreEqual("http://epplus.codeplex.com", result.Result); }
public void HyperlinkWithInvalidArgumentReturnsPoundValue() { var func = new Hyperlink(); var args = FunctionsHelper.CreateArgs(); var result = func.Execute(args, this.ParsingContext); Assert.AreEqual(eErrorType.Value, ((ExcelErrorValue)result.Result).Type); }
private void ExecuteHyperlink(object sender, ExecutedRoutedEventArgs e) { if (Hyperlink != null) { Hyperlink.Execute(e.Parameter.ToString()); } else { try { Process.Start(e.Parameter.ToString()); } catch { // todo add logging } } }