diff options
author | George Fraser <george@fivetran.com> | 2018-05-20 00:47:56 -0700 |
---|---|---|
committer | George Fraser <george@fivetran.com> | 2018-05-20 00:48:29 -0700 |
commit | 674e1c9c3c3dc6280bf4f7fb9a1391d50c54b9ab (patch) | |
tree | 697ebdf405a03b2e1a4f069350c37cbde6a1238c /src/test | |
parent | a1808a6be7298f9b5f5a5705ca46d714ba583b03 (diff) | |
download | java-language-server-674e1c9c3c3dc6280bf4f7fb9a1391d50c54b9ab.zip |
Factor out path
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/java/org/javacs/JavaPresentationCompilerTest.java | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/test/java/org/javacs/JavaPresentationCompilerTest.java b/src/test/java/org/javacs/JavaPresentationCompilerTest.java index b191883..56ac578 100644 --- a/src/test/java/org/javacs/JavaPresentationCompilerTest.java +++ b/src/test/java/org/javacs/JavaPresentationCompilerTest.java @@ -1,7 +1,7 @@ package org.javacs; import static org.hamcrest.Matchers.*; -import static org.junit.Assert.assertTrue; +import static org.junit.Assert.*; import com.sun.source.util.*; import java.io.IOException; @@ -28,11 +28,8 @@ public class JavaPresentationCompilerTest { @Test public void element() throws IOException { - Optional<Element> found = - compiler.element(URI.create("/HelloWorld.java"), helloWorld, 3, 18); + Element found = compiler.element(URI.create("/HelloWorld.java"), helloWorld, 3, 18); - assertTrue(found.isPresent()); - - LOG.info(found.get().toString()); + assertThat(found.getSimpleName(), hasToString(containsString("println"))); } } |