Function: projectile-test-at-point-java-name
projectile-test-at-point-java-name is a byte-compiled function defined
in projectile.el.
Signature
(projectile-test-at-point-java-name NODE)
Documentation
Return the test name for the Java method_declaration NODE.
Return nil unless the method carries a @Test\= annotation (JUnit's
@ParameterizedTest\= and @RepeatedTest\= count too).
Source Code
;; Defined in ~/.emacs.d/elpa/projectile-20260820.1509/projectile.el
(defun projectile-test-at-point-java-name (node)
"Return the test name for the Java `method_declaration' NODE.
Return nil unless the method carries a `@Test\\=' annotation (JUnit\\='s
`@ParameterizedTest\\=' and `@RepeatedTest\\=' count too)."
(when-let* ((name-node (treesit-node-child-by-field-name node "name"))
(name (treesit-node-text name-node t))
(modifiers (treesit-node-child node 0 t)))
(when (and (equal (treesit-node-type modifiers) "modifiers")
(projectile--test-at-point-annotated-p
(treesit-node-text modifiers t)
'("Test" "ParameterizedTest" "RepeatedTest")))
name)))