/// <summary> /// create the basic connection and test it out /// </summary> private bool basicConnection(TestLinkConnectionData connection) { lastException = null; proxy = new TestLink(connection.DevKey, connection.Url); try { proxy.SayHello(); } catch (TestLinkException tlex) { lastException = tlex; log.ErrorFormat("Failed to connect to TestLink at {1}. Message was '{0}'", tlex.Message, connection.Url); return(false); } return(true); }
/// <summary> /// try to update the connection with a minimum of API calls to testlink /// </summary> /// <param name="newData"></param> public bool UpdateConnectionData(TestLinkConnectionData newData) { if (newData == null) { log.Error("No TestLinkFixture detected"); basicConnectionValid = false; connectionData = null; return(false); } if (connectionData == null) { connectionData = new TestLinkConnectionData(); } //attempt a new connection if url or devkey are different if (!connectionData.Equals(newData)) { basicConnectionValid = basicConnection(newData); } connectionData = newData; return(basicConnectionValid); }
public bool Equals(TestLinkConnectionData tlcd) { return ((tlcd.DevKey == DevKey) && (tlcd.Url == Url) && (tlcd.User == User)); }
public bool Equals(TestLinkConnectionData tlcd) { return((tlcd.DevKey == DevKey) && (tlcd.Url == Url) && (tlcd.User == User)); }