use of com.intellij.tasks.actions.OpenTaskDialog in project intellij-community by JetBrains.
the class TaskBranchesTest method testOpenTaskDialog.
public void testOpenTaskDialog() throws Exception {
initRepository("foo");
String defaultBranchName = getDefaultBranchName();
LocalTaskImpl task = myTaskManager.createLocalTask("foo");
OpenTaskDialog dialog = new OpenTaskDialog(getProject(), task);
Disposer.register(getTestRootDisposable(), dialog.getDisposable());
try {
dialog.createTask();
assertEquals("foo", myTaskManager.getActiveTask().getSummary());
List<BranchInfo> branches = task.getBranches(true);
assertEquals(1, branches.size());
assertEquals(defaultBranchName, branches.get(0).name);
branches = task.getBranches(false);
assertEquals(1, branches.size());
assertEquals("foo", branches.get(0).name);
} finally {
dialog.close(DialogWrapper.OK_EXIT_CODE);
}
UIUtil.dispatchAllInvocationEvents();
}
Aggregations