diff --git a/plugins/git4idea/tests/git4idea/branch/GitBranchWorkerTest.groovy b/plugins/git4idea/tests/git4idea/branch/GitBranchWorkerTest.groovy index 982bcb7d7fec..5ccf63eaa7c2 100644 --- a/plugins/git4idea/tests/git4idea/branch/GitBranchWorkerTest.groovy +++ b/plugins/git4idea/tests/git4idea/branch/GitBranchWorkerTest.groovy @@ -205,7 +205,7 @@ class GitBranchWorkerTest extends GitPlatformTest { boolean notificationShown = false; checkoutOrMerge operation, "feature", [ - showUntrackedFilesNotification : { String s, Collection c -> notificationShown = true } + showUntrackedFilesNotification: { String s, VirtualFile root, Collection c -> notificationShown = true } ] assertTrue "Untracked files notification was not shown", notificationShown @@ -224,15 +224,15 @@ class GitBranchWorkerTest extends GitPlatformTest { def untracked = ["untracked.txt"] untrackedFileOverwrittenBy(myCommunity, "feature", untracked) - Collection untrackedFiles = null; + Collection untrackedPaths = null; checkoutOrMerge operation, "feature", [ - showUntrackedFilesDialogWithRollback : { String s, String p, Collection files -> untrackedFiles = files; false } + showUntrackedFilesDialogWithRollback: { + String s, String p, VirtualFile root, Collection files -> untrackedPaths = files; false + } ] - assertTrue "Untracked files dialog was not shown", untrackedFiles != null - assertEquals "Incorrect set of untracked files was shown in the dialog", - untracked, - untrackedFiles.collect { FileUtil.getRelativePath(myCommunity.root.path, it.path, '/'.toCharacter()) } + assertTrue "Untracked files dialog was not shown", untrackedPaths != null + assertEquals "Incorrect set of untracked files was shown in the dialog", untracked.asList(), untrackedPaths.asList() } public void "test checkout with local changes overwritten by checkout should show smart checkout dialog"() { @@ -252,7 +252,7 @@ class GitBranchWorkerTest extends GitPlatformTest { List changes = null; checkoutOrMerge(operation, "feature", [ - showSmartOperationDialog: { Project p, List cs, String op, boolean force -> + showSmartOperationDialog: { Project p, List cs, Collection paths, String op, boolean force -> changes = cs DialogWrapper.CANCEL_EXIT_CODE } @@ -349,7 +349,9 @@ class GitBranchWorkerTest extends GitPlatformTest { prepareLocalChangesOverwrittenBy(myUltimate) checkoutOrMerge(operation, "feature", [ - showSmartOperationDialog : { Project p, List cs, String op, boolean f -> GitSmartOperationDialog.CANCEL_EXIT_CODE }, + showSmartOperationDialog: { Project p, List cs, Collection paths, String op, boolean f + -> GitSmartOperationDialog.CANCEL_EXIT_CODE + }, ] as GitBranchUiHandler ) assertNull "Notification was unexpectedly shown:" + myVcsNotifier.lastNotification, myVcsNotifier.lastNotification @@ -372,8 +374,10 @@ class GitBranchWorkerTest extends GitPlatformTest { def rollbackMsg = null checkoutOrMerge(operation, "feature", [ - showSmartOperationDialog : { Project p, List cs, String op, boolean f -> GitSmartOperationDialog.CANCEL_EXIT_CODE }, - notifyErrorWithRollbackProposal: { String t, String m, String rp -> rollbackMsg = m ; false } + showSmartOperationDialog : { + Project p, List cs, Collection paths, String op, boolean f -> GitSmartOperationDialog.CANCEL_EXIT_CODE + }, + notifyErrorWithRollbackProposal: { String t, String m, String rp -> rollbackMsg = m; false } ] as GitBranchUiHandler ) assertNotNull "Rollback proposal was not shown", rollbackMsg @@ -384,7 +388,7 @@ class GitBranchWorkerTest extends GitPlatformTest { prepareLocalChangesOverwrittenBy(myUltimate) def uiHandler = [ - showSmartOperationDialog: { Project p, List cs, String op, boolean force -> + showSmartOperationDialog: { Project p, List cs, Collection paths, String op, boolean force -> GitSmartOperationDialog.FORCE_EXIT_CODE; }, ] as GitBranchUiHandler