From e08a9eb5ccd1ea654deb988f07d8bff94ed6c88b Mon Sep 17 00:00:00 2001 From: "virenderm01@gmail.com" Date: Thu, 28 May 2020 21:43:35 +0530 Subject: [PATCH] Issue #155- add pure Java generator --- .gitignore | 5 +++- .vscode/launch.json | 29 ++++++++++++++++++++ codegens/java-native/test/unit/dummy.js | 36 +++++++++++++++++++++++++ 3 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 .vscode/launch.json create mode 100644 codegens/java-native/test/unit/dummy.js diff --git a/.gitignore b/.gitignore index 3d3f1a253..c055aad8e 100644 --- a/.gitignore +++ b/.gitignore @@ -66,4 +66,7 @@ typings/ out/ -newmanResponses.json \ No newline at end of file +newmanResponses.json + +#history of files +.history \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 000000000..08628c066 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,29 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + + { + "type": "node", + "request": "launch", + "name": "Mocha Tests", + "program": "${workspaceFolder}/node_modules/mocha/bin/_mocha", + "args": [ + "-u", + "tdd", + "--timeout", + "999999", + "--colors", + "${workspaceFolder}/codegens/java-native/npm" + ], + "internalConsoleOptions": "openOnSessionStart", + "skipFiles": [ + "/**" + ] + } + ] + + +} \ No newline at end of file diff --git a/codegens/java-native/test/unit/dummy.js b/codegens/java-native/test/unit/dummy.js new file mode 100644 index 000000000..3cf8db931 --- /dev/null +++ b/codegens/java-native/test/unit/dummy.js @@ -0,0 +1,36 @@ + +var expect = require('chai').expect, +sdk = require('postman-collection'), +sanitize = require('../../lib/util').sanitize, +convert = require('../../lib/index').convert, +getOptions = require('../../lib/index').getOptions, +mainCollection = require('../../../../test/codegen/newman/fixtures/basicCollection.json'); + + + +var request = new sdk.Request({ + "method": "POST", + "header": [], + "body": { + "mode": "file", + "file": { + "src": "dummy.png" + } + }, + "url": { + "raw": "https://postman-echo.com/post", + "protocol": "https", + "host": [ + "postman-echo", + "com" + ], + "path": [ + "post" + ] + } +}); + convert(request, {}, function (error, snippet) { + console.log("snippet executed"); + console.log(snippet); + +}); \ No newline at end of file