Exemplo n.º 1
0
        public void HyperLinkShouldReturnLastArgIfTwoArgsAreSupplied()
        {
            var func   = new Hyperlink();
            var result = func.Execute(FunctionsHelper.CreateArgs("http://epplus.codeplex.com", "EPPlus"), _parsingContext);

            Assert.AreEqual("EPPlus", result.Result);
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
 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
         }
     }
 }