diff test/org/tmatesoft/hg/test/TestCheckout.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 47b7bedf0569
children ca56a36c2eea
line wrap: on
line diff
--- a/test/org/tmatesoft/hg/test/TestCheckout.java	Tue Feb 05 15:54:37 2013 +0100
+++ b/test/org/tmatesoft/hg/test/TestCheckout.java	Tue Feb 05 16:36:58 2013 +0100
@@ -17,6 +17,7 @@
 package org.tmatesoft.hg.test;
 
 import static org.junit.Assert.assertEquals;
+import static org.tmatesoft.hg.test.RepoUtils.cloneRepoToTempLocation;
 
 import java.io.File;
 import java.io.FileFilter;
@@ -47,7 +48,7 @@
 
 	@Test
 	public void testCleanCheckoutInEmptyDir() throws Exception {
-		File testRepoLoc = TestRevert.cloneRepoToTempLocation(Configuration.get().find("log-1"), "test-checkoutClean", true);
+		File testRepoLoc = cloneRepoToTempLocation("log-1", "test-checkoutClean", true);
 		repo = new HgLookup().detect(testRepoLoc);
 		// nothing but .hg dir
 		assertEquals("[sanity]", 0, testRepoLoc.listFiles(new FilesOnlyFilter()).length);
@@ -83,7 +84,7 @@
 
 	@Test
 	public void testBranchCheckout() throws Exception {
-		File testRepoLoc = TestRevert.cloneRepoToTempLocation(Configuration.get().find("log-branches"), "test-checkoutBranch", true);
+		File testRepoLoc = cloneRepoToTempLocation("log-branches", "test-checkoutBranch", true);
 		repo = new HgLookup().detect(testRepoLoc);
 		
 		new HgCheckoutCommand(repo).changeset(3 /*branch test*/).execute();