1. Explicit method call syntax is applied (server compilation fails otherwise);
2. Comments are added;
@Test
public void mergeGradleLocalToIntellij() {
+ // Configure initial projects state.
init(
gradle {
module {
} } }
)
+ // Check that the initial projects state is correctly parsed.
checkChanges {
presence {
lib(gradle: gradle.modules.dependencies.flatten().findAll { it.name == "lib2" })
lib2('gradle')
} } } }
+ // Define changed project state.
gradle {
module {
dependencies {
lib(name: "lib1")
} } }
+
+ // Apply the changed project state and check if it's correctly parsed.
changesModel.update(gradle.project)
assertEquals([].toSet(), changesModel.changes)
checkTree {
check it as Node, actual.getChildAt(childIndex++) as DefaultMutableTreeNode
}
if (childIndex < actual.childCount) {
- fail("Unexpected nodes detected: ${(childIndex..<actual.childCount).collect { actual.getChildAt(it) } join '-'}")
+ fail("Unexpected nodes detected: ${(childIndex..<actual.childCount).collect { actual.getChildAt(it) }.join('-')}")
}
}