Ejemplo n.º 1
0
        public static ITestLinkExtra GetTestLink()
        {
            ITestLinkExtra result =
                GetTestLink(TestLinkApiKeyRight, TestLinkUrlRight);

            return(result);
        }
Ejemplo n.º 2
0
        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);
            }
        }
Ejemplo n.º 3
0
 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;
     }
 }