diff options
author | George Fraser <george@fivetran.com> | 2018-12-31 16:05:09 -0800 |
---|---|---|
committer | George Fraser <george@fivetran.com> | 2018-12-31 16:05:09 -0800 |
commit | 25c67bb8f300f8af13b7312933dec157e67e678c (patch) | |
tree | 4eb2076b4da8571fe59338c7185b6aa63963e467 /src/test/java | |
parent | 8f63f14f980f44af2c5747747320703819ebc402 (diff) | |
download | java-language-server-25c67bb8f300f8af13b7312933dec157e67e678c.zip |
Add @Override
Diffstat (limited to 'src/test/java')
-rw-r--r-- | src/test/java/org/javacs/FormattingTest.java | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/test/java/org/javacs/FormattingTest.java b/src/test/java/org/javacs/FormattingTest.java new file mode 100644 index 0000000..97974a4 --- /dev/null +++ b/src/test/java/org/javacs/FormattingTest.java @@ -0,0 +1,28 @@ +package org.javacs; + +import static org.hamcrest.Matchers.*; +import static org.junit.Assert.*; + +import java.util.List; +import org.javacs.lsp.DocumentFormattingParams; +import org.javacs.lsp.TextDocumentIdentifier; +import org.javacs.lsp.TextEdit; +import org.junit.Test; + +public class FormattingTest { + + private static final JavaLanguageServer server = LanguageServerFixture.getJavaLanguageServer(); + + private List<TextEdit> formatting(String file) { + var uri = FindResource.uri(file); + var params = new DocumentFormattingParams(); + params.textDocument = new TextDocumentIdentifier(uri); + return server.formatting(params); + } + + @Test + public void addOverride() { + var edits = formatting("/org/javacs/example/AddOverride.java"); + assertThat(edits, not(empty())); + } +} |