From 11fdfb2ccfb150c178753a8ebaf79b13dfd4e623 Mon Sep 17 00:00:00 2001 From: Scott Wells Date: Tue, 10 Dec 2024 16:53:32 -0600 Subject: [PATCH] Inlined filenames and bodies. --- .../TypeScriptCodeBlockProviderTest.java | 16 +++++++--------- .../TypeScriptSelectionRangeTest.java | 19 +++++++++---------- 2 files changed, 16 insertions(+), 19 deletions(-) diff --git a/src/test/java/com/redhat/devtools/lsp4ij/features/foldingRange/TypeScriptCodeBlockProviderTest.java b/src/test/java/com/redhat/devtools/lsp4ij/features/foldingRange/TypeScriptCodeBlockProviderTest.java index 295df1dfc..f6b6d4b4d 100644 --- a/src/test/java/com/redhat/devtools/lsp4ij/features/foldingRange/TypeScriptCodeBlockProviderTest.java +++ b/src/test/java/com/redhat/devtools/lsp4ij/features/foldingRange/TypeScriptCodeBlockProviderTest.java @@ -23,8 +23,6 @@ public TypeScriptCodeBlockProviderTest() { } public void testCodeBlocks() { - String testFilename = "demo.ts"; - // language=json String mockFoldingRangesJson = """ [ @@ -40,7 +38,7 @@ public void testCodeBlocks() { """; assertCodeBlock( - testFilename, + "demo.ts", """ export class Demo { demo() { @@ -52,7 +50,7 @@ export class Demo { ); assertCodeBlock( - testFilename, + "demo.ts", """ export class Demo { demo() { @@ -64,7 +62,7 @@ export class Demo { ); assertCodeBlock( - testFilename, + "demo.ts", """ export class Demo { demo() { @@ -76,7 +74,7 @@ export class Demo { ); assertCodeBlock( - testFilename, + "demo.ts", """ export class Demo { demo() { @@ -88,7 +86,7 @@ export class Demo { ); assertCodeBlock( - testFilename, + "demo.ts", """ export class Demo { demo() { @@ -100,7 +98,7 @@ export class Demo { ); assertCodeBlock( - testFilename, + "demo.ts", """ export class Demo { demo() { @@ -112,7 +110,7 @@ export class Demo { ); assertCodeBlock( - testFilename, + "demo.ts", """ export class Demo { demo() { diff --git a/src/test/java/com/redhat/devtools/lsp4ij/features/selectionRange/TypeScriptSelectionRangeTest.java b/src/test/java/com/redhat/devtools/lsp4ij/features/selectionRange/TypeScriptSelectionRangeTest.java index 0c3769ec7..c23865dec 100644 --- a/src/test/java/com/redhat/devtools/lsp4ij/features/selectionRange/TypeScriptSelectionRangeTest.java +++ b/src/test/java/com/redhat/devtools/lsp4ij/features/selectionRange/TypeScriptSelectionRangeTest.java @@ -18,18 +18,15 @@ */ public class TypeScriptSelectionRangeTest extends LSPSelectionRangeFixtureTestCase { - private static final String DEMO_TS_FILE_NAME = "demo.ts"; - // language=typescript - private static final String DEMO_TS_FILE_BODY = "console.log('message');"; - public TypeScriptSelectionRangeTest() { super("*.ts"); } public void testSelectionRanges_qualifierExpression() { assertSelectionRanges( - DEMO_TS_FILE_NAME, - DEMO_TS_FILE_BODY, + "demo.ts", + // language=typescript + "console.log('message');", // Start on the qualifier "console", // language=json @@ -94,8 +91,9 @@ public void testSelectionRanges_qualifierExpression() { public void testSelectionRanges_callExpression() { assertSelectionRanges( - DEMO_TS_FILE_NAME, - DEMO_TS_FILE_BODY, + "demo.ts", + // language=typescript + "console.log('message');", // Start at the call to log "log", // language=json @@ -160,8 +158,9 @@ public void testSelectionRanges_callExpression() { public void testSelectionRanges_stringLiteral() { assertSelectionRanges( - DEMO_TS_FILE_NAME, - DEMO_TS_FILE_BODY, + "demo.ts", + // language=typescript + "console.log('message');", // Start in the string literal "message", // language=json