private void SetupProxy(TestLinkFixtureAttribute tlfa) { if (serverUrl != tlfa.Url) { serverUrl = tlfa.Url; proxy = new TestLink(tlfa.DevKey, tlfa.Url); allProjects = proxy.GetProjects(); } }
protected void Setup() { proxy = new TestLink(apiKey, targetDBUrl, true); }
public void shouldFailBecauseOfInvalidURL() { proxy = new TestLink(apiKey, "http://localhost/testlink/api/xmlrpc.php"); string result = proxy.SayHello(); Assert.AreNotEqual("Hello!", result, "Unexpected Server Response"); Assert.Fail("Did not cause an exception"); }
public void shouldFailBecauseOfNullDevKey() { proxy = new TestLink(null, targetDBUrl); List<TestCaseId> tcidList = proxy.GetTestCaseIDByName("10 G shock"); string result = proxy.SayHello(); Assert.AreNotEqual("Hello!", result, "Unexpected Server Response"); Assert.Fail("Did not cause an exception"); }
/// <summary> /// create the basic connection and test it out /// </summary> /// <param name="devKey"></param> /// <param name="url"></param> /// <returns>true if the connection is valid</returns> private bool basicConnection(string devKey, string url) { lastException = null; proxy = new TestLink(connectionData.DevKey, connectionData.Url); AllTestPlans = new List<TestPlan>(); try { allProjects = proxy.GetProjects(); } catch (TestLinkException tlex) { lastException = tlex; Console.WriteLine("Failed to connect to TestLink at {1}. Message was '{0}'", tlex.Message, url); return false; } return true; }