comparison test/org/tmatesoft/hg/test/TestOutgoing.java @ 536:2813a26b8999

Tests: refactor various utility methods to a single location
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Tue, 05 Feb 2013 16:36:58 +0100
parents 41a778e3fd31
children 629a7370554c
comparison
equal deleted inserted replaced
535:d9c07e1432c4 536:2813a26b8999
53 @Test 53 @Test
54 public void testSimple() throws Exception { 54 public void testSimple() throws Exception {
55 int x = 0; 55 int x = 0;
56 HgLookup lookup = new HgLookup(); 56 HgLookup lookup = new HgLookup();
57 for (HgRemoteRepository hgRemote : Configuration.get().allRemote()) { 57 for (HgRemoteRepository hgRemote : Configuration.get().allRemote()) {
58 File dest = TestIncoming.createEmptyDir("test-outgoing-" + x++); 58 File dest = RepoUtils.createEmptyDir("test-outgoing-" + x++);
59 ExecHelper eh0 = new ExecHelper(new OutputParser.Stub(false), null); 59 ExecHelper eh0 = new ExecHelper(new OutputParser.Stub(false), null);
60 eh0.run("hg", "clone", hgRemote.getLocation(), dest.toString()); 60 eh0.run("hg", "clone", hgRemote.getLocation(), dest.toString());
61 eh0.cwd(dest); 61 eh0.cwd(dest);
62 Assert.assertEquals("initial clone failed", 0, eh0.getExitValue()); 62 Assert.assertEquals("initial clone failed", 0, eh0.getExitValue());
63 HgOutgoingCommand cmd = new HgOutgoingCommand(lookup.detect(dest)).against(hgRemote); 63 HgOutgoingCommand cmd = new HgOutgoingCommand(lookup.detect(dest)).against(hgRemote);