diff options
author | George Fraser <george@fivetran.com> | 2018-09-16 17:18:11 -0700 |
---|---|---|
committer | George Fraser <george@fivetran.com> | 2018-09-16 17:18:11 -0700 |
commit | 177395e3bd3f59064adc0e8744af6173dd8aae03 (patch) | |
tree | 5e0e04e6a39509084ca6b262b319b49c4ba9e104 /src/test | |
parent | df76c549836fcb2707a36b091023c2d0062ea293 (diff) | |
download | java-language-server-177395e3bd3f59064adc0e8744af6173dd8aae03.zip |
Modularize
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/java/org/javacs/CodeLensTest.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/test/java/org/javacs/CodeLensTest.java b/src/test/java/org/javacs/CodeLensTest.java index 2d02fd1..6f0c802 100644 --- a/src/test/java/org/javacs/CodeLensTest.java +++ b/src/test/java/org/javacs/CodeLensTest.java @@ -5,6 +5,7 @@ import static org.junit.Assert.*; import java.util.ArrayList; import java.util.List; +import java.util.Objects; import java.util.StringJoiner; import java.util.concurrent.ExecutionException; import org.eclipse.lsp4j.CodeLens; @@ -31,7 +32,7 @@ public class CodeLensTest { for (var lens : lenses) { var command = new StringJoiner(", "); for (var arg : lens.getCommand().getArguments()) { - command.add(arg.toString()); + command.add(Objects.toString(arg)); } commands.add(command.toString()); } @@ -45,7 +46,8 @@ public class CodeLensTest { assertThat(lenses, not(empty())); var commands = commands(lenses); - assertThat(commands, hasItem("HasTest, testMethod")); - assertThat(commands, hasItem("HasTest, otherTestMethod")); + assertThat(commands, hasItem(containsString("HasTest, null"))); + assertThat(commands, hasItem(containsString("HasTest, testMethod"))); + assertThat(commands, hasItem(containsString("HasTest, otherTestMethod"))); } } |