Skip to content

Commit

Permalink
Renamed to "assertCodeBlock" since it only tests a single code block …
Browse files Browse the repository at this point in the history
…per-invocation now.
  • Loading branch information
SCWells72 committed Dec 10, 2024
1 parent 0d10203 commit 724841b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public void testCodeBlocks() {
]
""";

assertCodeBlocks(
assertCodeBlock(
testFilename,
"""
export class Demo {
Expand All @@ -51,7 +51,7 @@ export class Demo {
mockFoldingRangesJson
);

assertCodeBlocks(
assertCodeBlock(
testFilename,
"""
export class Demo {<start>
Expand All @@ -63,7 +63,7 @@ export class Demo {<start>
mockFoldingRangesJson
);

assertCodeBlocks(
assertCodeBlock(
testFilename,
"""
export class Demo {<caret><start>
Expand All @@ -75,7 +75,7 @@ export class Demo {<caret><start>
mockFoldingRangesJson
);

assertCodeBlocks(
assertCodeBlock(
testFilename,
"""
export class Demo <caret>{<start>
Expand All @@ -87,7 +87,7 @@ export class Demo <caret>{<start>
mockFoldingRangesJson
);

assertCodeBlocks(
assertCodeBlock(
testFilename,
"""
export class Demo {<start>
Expand All @@ -99,7 +99,7 @@ export class Demo {<start>
mockFoldingRangesJson
);

assertCodeBlocks(
assertCodeBlock(
testFilename,
"""
export class Demo {<start>
Expand All @@ -111,7 +111,7 @@ export class Demo {<start>
mockFoldingRangesJson
);

assertCodeBlocks(
assertCodeBlock(
testFilename,
"""
export class <caret><start><end>Demo {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ protected LSPCodeBlockProviderFixtureTestCase(String... fileNamePatterns) {
super(fileNamePatterns);
}

protected void assertCodeBlocks(@NotNull String fileName,
@NotNull String fileBody,
@NotNull String mockFoldingRangesJson) {
protected void assertCodeBlock(@NotNull String fileName,
@NotNull String fileBody,
@NotNull String mockFoldingRangesJson) {
MockLanguageServer.INSTANCE.setTimeToProceedQueries(100);
List<FoldingRange> mockFoldingRanges = JSONUtils.getLsp4jGson().fromJson(mockFoldingRangesJson, new TypeToken<List<FoldingRange>>() {
}.getType());
Expand Down

0 comments on commit 724841b

Please sign in to comment.