public void CreateJobListTest() { bool unicode = false; string server = "localhost:6666"; string user = "******"; string pass = string.Empty; string ws_client = "admin_space"; for (int i = 0; i < 2; i++) // run once for ascii, once for unicode { Process p4d = Utilities.DeployP4TestServer(TestDir, unicode); try { using (P4Server target = new P4Server(server, user, pass, ws_client)) { //P4JobList expected = null; P4JobList actual; actual = new P4JobList(target); Assert.AreEqual(1, actual.Count); } } catch (Exception ex) { Assert.Fail("Exception Thrown: {0} : {1}", ex.ToString(), ex.Message); } finally { Utilities.RemoveTestServer(p4d, TestDir); } unicode = !unicode; } }
public void CreateJobListTest1() { bool unicode = false; string server = "localhost:6666"; string user = "******"; string pass = string.Empty; string ws_client = "admin_space"; for (int i = 0; i < 2; i++) // run once for ascii, once for unicode { Process p4d = Utilities.DeployP4TestServer(TestDir, unicode); try { using (P4Server target = new P4Server(server, user, pass, ws_client)) { string jobView = "user=admin"; bool includeIntegratedFixes = true; bool longOutput = true; bool reverseOrder = true; int maxItems = 1; string[] files = new String[] { "//depot/..." }; P4JobList actual; actual = new P4JobList(target, jobView, includeIntegratedFixes, longOutput, reverseOrder, maxItems, files); Assert.AreEqual(1, actual.Count); } } catch (Exception ex) { Assert.Fail("Exception Thrown: {0} : {1}", ex.ToString(), ex.Message); } finally { Utilities.RemoveTestServer(p4d, TestDir); } unicode = !unicode; } }