mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[gui-test] ExtendedJTreePathFixture: corrected secondary constructor and its usage
This commit is contained in:
+7
-1
@@ -23,7 +23,13 @@ open class ExtendedJTreePathFixture(
|
||||
private val myDriver: ExtendedJTreeDriver = ExtendedJTreeDriver(robot)
|
||||
) : JTreeFixture(robot, tree) {
|
||||
|
||||
constructor(tree: JTree, path: TreePath, predicate: FinderPredicate, robot: Robot, driver: ExtendedJTreeDriver) :
|
||||
constructor(
|
||||
tree: JTree,
|
||||
path: TreePath,
|
||||
predicate: FinderPredicate = ExtendedJTreePathFinder.predicateEquality,
|
||||
robot: Robot = GuiRobotHolder.robot,
|
||||
driver: ExtendedJTreeDriver = ExtendedJTreeDriver(robot)
|
||||
) :
|
||||
this(tree, path.path.map { it.toString() }.toList(), predicate, robot, driver)
|
||||
|
||||
init {
|
||||
|
||||
+3
-3
@@ -767,11 +767,11 @@ object Utils {
|
||||
fun getJTreePathItemsString(cmp: JTree, path: TreePath): String {
|
||||
return getJTreePathArray(cmp, path)
|
||||
.map { StringUtil.wrapWithDoubleQuote(it) }
|
||||
.reduceRight({ s, s1 -> "$s, $s1" })
|
||||
.reduceRight { s, s1 -> "$s, $s1" }
|
||||
}
|
||||
|
||||
internal fun getJTreePathArray(tree: JTree, path: TreePath): List<String> = withRobot { robot ->
|
||||
ExtendedJTreePathFixture(tree, path, robot).getPathStrings()
|
||||
private fun getJTreePathArray(tree: JTree, path: TreePath): List<String> = withRobot { robot ->
|
||||
ExtendedJTreePathFixture(tree, path, robot = robot).getPathStrings()
|
||||
}
|
||||
|
||||
fun <ReturnType> withRobot(robotFunction: (Robot) -> ReturnType): ReturnType {
|
||||
|
||||
Reference in New Issue
Block a user