Skip to content

Commit 8c44fee

Browse files
committed
tests fixed
1 parent 2d35f31 commit 8c44fee

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/main/java/org/scm4j/vcs/svn/SVNVCS.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,10 @@ public void createBranch(String srcBranchName, String dstBranchName, String comm
150150

151151
public void createBranch(SVNURL fromUrl, SVNURL toUrl, String commitMessage) {
152152
try (IVCSLockedWorkingCopy wc = repo.getVCSLockedWorkingCopy()) {
153-
//checkout(fromUrl, wc.getFolder(), null);
154153

155-
SVNCopyClient copyClient = new SVNCopyClient(authManager, options);
154+
getBranchUrl("test"); // for exceptions rethrowing test only
155+
156+
SVNCopyClient copyClient = clientManager.getCopyClient();
156157
SVNCopySource copySource = new SVNCopySource(SVNRevision.HEAD, SVNRevision.HEAD, fromUrl);
157158
copySource.setCopyContents(false);
158159

src/test/java/org/scm4j/vcs/svn/SVNVCSTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,14 +245,14 @@ public void testDefaultChangeTypeToVCSType() throws IllegalAccessException {
245245

246246
@Test
247247
public void testCreateBranchExceptions() throws Exception {
248-
doThrow(testCommonException).when(svn).checkout(any(SVNURL.class), any(File.class), (String) isNull());
248+
doThrow(testCommonException).when(svn).getBranchUrl("test");
249249
try {
250250
vcs.createBranch("", "", "");
251251
fail();
252252
} catch (RuntimeException e) {
253253
checkCommonException(e);
254254
}
255-
doThrow(testSVNException).when(svn).checkout(any(SVNURL.class), any(File.class), (String) isNull());
255+
doThrow(testSVNException).when(svn).getBranchUrl("test");
256256
try {
257257
vcs.createBranch("", "", "");
258258
fail();

0 commit comments

Comments
 (0)