implements PLN-0034 lsp inline hint transport contract

This commit is contained in:
2026-04-03 11:23:01 +01:00
parent 08f28b4a7d
commit 3e8f53dc16
10 changed files with 178 additions and 1 deletions
@@ -0,0 +1,22 @@
package p.studio.lsp.dtos;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;
final class LspInlineHintDTOTest {
@Test
void trimsLabelAndCategory() {
final var hint = new LspInlineHintDTO(new LspRangeDTO(3, 3), " int ", " type ");
assertEquals("int", hint.label());
assertEquals("type", hint.category());
}
@Test
void rejectsBlankLabels() {
assertThrows(IllegalArgumentException.class, () ->
new LspInlineHintDTO(new LspRangeDTO(1, 1), " ", "type"));
}
}