コード例 #1
0
        public static ITestLinkExtra GetTestLink()
        {
            ITestLinkExtra result =
                GetTestLink(TestLinkApiKeyRight, TestLinkUrlRight);

            return(result);
        }
コード例 #2
0
ファイル: TLHelper.cs プロジェクト: lddd99/guiatuomation
        internal static ITestLinkExtra ConnectTestLink(
            TLSConnectCmdletBase cmdlet,
            ITestLinkExtra testLinkObject)
        {
            try {
                cmdlet.WriteVerbose(cmdlet, "testing the availability of TestLink");
                testLinkObject.SayHello();

                cmdlet.WriteVerbose(cmdlet, "testing the api key");
                testLinkObject.checkDevKey(cmdlet.ApiKey);

                TLAddinData.CurrentTestLinkConnection =
                    testLinkObject;
                return(testLinkObject);
            }
            catch (UriFormatException eUriFormat) {
                cmdlet.WriteVerbose(cmdlet, "Wrong Uri: " + eUriFormat.Message);
                return(null);
            }
            catch (TestLinkException eTestLinkNative) {
                cmdlet.WriteVerbose(cmdlet, "Wrong Apikey: " + eTestLinkNative.Message);
                return(null);
            }
            catch (Exception eTestLInk) {
                cmdlet.WriteVerbose(cmdlet, "Something went wrong: " + eTestLInk.Message);
                return(null);
            }
        }
コード例 #3
0
ファイル: TLHelper.cs プロジェクト: MatkoHanus/STUPS
 internal static ITestLinkExtra ConnectTestLink(
     TLSConnectCmdletBase cmdlet,
     ITestLinkExtra testLinkObject)
 {
     try {
         
         cmdlet.WriteVerbose(cmdlet, "testing the availability of TestLink");
         testLinkObject.SayHello();
         
         cmdlet.WriteVerbose(cmdlet, "testing the api key");
         testLinkObject.checkDevKey(cmdlet.ApiKey);
         
         TLAddinData.CurrentTestLinkConnection =
             testLinkObject;
         return testLinkObject;
         
     }
     catch (UriFormatException eUriFormat) {
         cmdlet.WriteVerbose(cmdlet, "Wrong Uri: " + eUriFormat.Message);
         return null;
     }
     catch (TestLinkException eTestLinkNative) {
         cmdlet.WriteVerbose(cmdlet, "Wrong Apikey: " + eTestLinkNative.Message);
         return null;
     }
     catch (Exception eTestLInk) {
         cmdlet.WriteVerbose(cmdlet, "Something went wrong: " + eTestLInk.Message);
         return null;
     }
 }