Skip to content

Commit

Permalink
Increase the test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
nipunayf committed Nov 22, 2024
1 parent db4f88d commit fb02274
Show file tree
Hide file tree
Showing 5 changed files with 471 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public void test(Path config) throws IOException {
JsonObject actualMethod = ApiSpecGenerator.generate(method);

if (!actualMethod.equals(expectedMethod)) {
updateConfig(config, actualMethod);
// updateConfig(config, actualMethod);
Assert.fail("Failed test: " + config);
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
{
"method": "textDocument/selectionRange",
"parameters": [
{
"name": "param0",
"schema": {
"properties": {
"textDocument": {
"properties": {
"uri": {
"type": "string",
"className": "java.lang.String"
}
},
"type": "object",
"className": "org.eclipse.lsp4j.TextDocumentIdentifier"
},
"positions": {
"item": {
"properties": {
"character": {
"type": "integer",
"className": "int"
},
"line": {
"type": "integer",
"className": "int"
}
},
"type": "object",
"className": "org.eclipse.lsp4j.Position"
},
"type": "array",
"className": "java.util.List<org.eclipse.lsp4j.Position>"
}
},
"type": "object",
"className": "org.eclipse.lsp4j.SelectionRangeParams"
}
}
],
"returnType": {
"item": {
"properties": {
"parent": {
"type": "object",
"className": "org.eclipse.lsp4j.SelectionRange"
},
"range": {
"properties": {
"start": {
"properties": {
"character": {
"type": "integer",
"className": "int"
},
"line": {
"type": "integer",
"className": "int"
}
},
"type": "object",
"className": "org.eclipse.lsp4j.Position"
},
"end": {
"properties": {
"character": {
"type": "integer",
"className": "int"
},
"line": {
"type": "integer",
"className": "int"
}
},
"type": "object",
"className": "org.eclipse.lsp4j.Position"
}
},
"type": "object",
"className": "org.eclipse.lsp4j.Range"
}
},
"type": "object",
"className": "org.eclipse.lsp4j.SelectionRange"
},
"type": "array",
"className": "java.util.List<org.eclipse.lsp4j.SelectionRange>"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"method": "textDocument/documentHighlight",
"parameters": [
{
"name": "param0",
"schema": {
"properties": {},
"type": "object",
"className": "org.eclipse.lsp4j.DocumentHighlightParams"
}
}
],
"returnType": {
"item": {
"properties": {
"kind": {
"enumValues": [
"Text",
"Read",
"Write"
],
"type": "string",
"className": "org.eclipse.lsp4j.DocumentHighlightKind"
},
"range": {
"properties": {
"start": {
"properties": {
"character": {
"type": "integer",
"className": "int"
},
"line": {
"type": "integer",
"className": "int"
}
},
"type": "object",
"className": "org.eclipse.lsp4j.Position"
},
"end": {
"properties": {
"character": {
"type": "integer",
"className": "int"
},
"line": {
"type": "integer",
"className": "int"
}
},
"type": "object",
"className": "org.eclipse.lsp4j.Position"
}
},
"type": "object",
"className": "org.eclipse.lsp4j.Range"
}
},
"type": "object",
"className": "org.eclipse.lsp4j.DocumentHighlight"
},
"type": "array",
"className": "java.util.List<? extends org.eclipse.lsp4j.DocumentHighlight>"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
{
"method": "textDocument/rangeFormatting",
"parameters": [
{
"name": "param0",
"schema": {
"properties": {
"workDoneToken": {
"properties": {
"left": {
"type": "object",
"className": "java.lang.Object"
},
"right": {
"type": "object",
"className": "java.lang.Object"
}
},
"type": "object",
"className": "org.eclipse.lsp4j.jsonrpc.messages.Either"
},
"textDocument": {
"properties": {
"uri": {
"type": "string",
"className": "java.lang.String"
}
},
"type": "object",
"className": "org.eclipse.lsp4j.TextDocumentIdentifier"
},
"options": {
"item": {
"type": "object",
"className": "java.lang.Object"
},
"type": "map",
"className": "org.eclipse.lsp4j.FormattingOptions"
},
"range": {
"properties": {
"start": {
"properties": {
"character": {
"type": "integer",
"className": "int"
},
"line": {
"type": "integer",
"className": "int"
}
},
"type": "object",
"className": "org.eclipse.lsp4j.Position"
},
"end": {
"properties": {
"character": {
"type": "integer",
"className": "int"
},
"line": {
"type": "integer",
"className": "int"
}
},
"type": "object",
"className": "org.eclipse.lsp4j.Position"
}
},
"type": "object",
"className": "org.eclipse.lsp4j.Range"
}
},
"type": "object",
"className": "org.eclipse.lsp4j.DocumentRangeFormattingParams"
}
}
],
"returnType": {
"item": {
"properties": {
"newText": {
"type": "string",
"className": "java.lang.String"
},
"range": {
"properties": {
"start": {
"properties": {
"character": {
"type": "integer",
"className": "int"
},
"line": {
"type": "integer",
"className": "int"
}
},
"type": "object",
"className": "org.eclipse.lsp4j.Position"
},
"end": {
"properties": {
"character": {
"type": "integer",
"className": "int"
},
"line": {
"type": "integer",
"className": "int"
}
},
"type": "object",
"className": "org.eclipse.lsp4j.Position"
}
},
"type": "object",
"className": "org.eclipse.lsp4j.Range"
}
},
"type": "object",
"className": "org.eclipse.lsp4j.TextEdit"
},
"type": "array",
"className": "java.util.List<? extends org.eclipse.lsp4j.TextEdit>"
}
}
Loading

0 comments on commit fb02274

Please sign in to comment.