Merge branch '42-working-test-case-into-readme' of https://hyde.infosys.tuwien.ac...
authorFabian Eichhorner <fabian.eichhorner@gmail.com>
Thu, 13 Dec 2018 09:09:03 +0000 (10:09 +0100)
committerFabian Eichhorner <fabian.eichhorner@gmail.com>
Thu, 13 Dec 2018 09:09:03 +0000 (10:09 +0100)
service-reporting/README.md

index 527651f0e548b3943b48d4d5bee40b830e9b0fa6..715d1a38b9219130f131565bda654d5172754fcd 100644 (file)
@@ -44,7 +44,7 @@ Term(string `Name`, double `Sentiment`)
 - `dotnet run`
 
 ## Tests
-- successfull pdf as application/json: `curl -X POST \ http://localhost:8083/generatePDF \ -H 'Content-Type: application/json' \ -d '[ { "name": "A bad term", "sentiment": 0.1 }, { "name": "Another bad term", "sentiment": 0.3 }, { "name": "A neutral term", "sentiment": 0.5 }, { "name": "A good term", "sentiment": 0.65 }, { "name": "Another good term", "sentiment": 0.9 } ] '`
-- successfull pdf as application/base64: `curl -X POST \ http://localhost:8083/generatePDF \ -H 'Accept: application/base64' \ -H 'Content-Type: application/json' \ -d '[ { "name": "A bad term", "sentiment": 0.1 }, { "name": "Another bad term", "sentiment": 0.3 }, { "name": "A neutral term", "sentiment": 0.5 }, { "name": "A good term", "sentiment": 0.65 }, { "name": "Another good term", "sentiment": 0.9 } ] '`
-- invalid sentiment value: `curl -X POST \ http://localhost:8083/generatePDF \ -H 'Content-Type: application/json' \ -d '[ { "name": "Term with invalid sentiment value", "sentiment": 12 } ] '`
-- invalid json structure: `curl -X POST \ http://localhost:8083/generatePDF \ -H 'Content-Type: application/json' \ -d '[ { "name1": "A term with invalid json format", "sentiment": 0.5 } ] '`
\ No newline at end of file
+- successfull pdf as application/json: `curl -X POST  http://localhost:8083/generatePDF  -H 'Content-Type: application/json'  -d '[ { "name": "A bad term", "sentiment": 0.1 }, { "name": "Another bad term", "sentiment": 0.3 }, { "name": "A neutral term", "sentiment": 0.5 }, { "name": "A good term", "sentiment": 0.65 }, { "name": "Another good term", "sentiment": 0.9 } ] ' > test1.pdf`
+- successfull pdf as application/base64: `curl -X POST http://localhost:8083/generatePDF -H 'Accept: application/base64' -H 'Content-Type: application/json' -d '[ { "name": "A bad term", "sentiment": 0.1 }, { "name": "Another bad term", "sentiment": 0.3 }, { "name": "A neutral term", "sentiment": 0.5 }, { "name": "A good term", "sentiment": 0.65 }, { "name": "Another good term", "sentiment": 0.9 } ] ' | base64 -d > test2.pdf`
+- invalid sentiment value: `curl -X POST http://localhost:8083/generatePDF -H 'Content-Type: application/json' -d '[ { "name": "Term with invalid sentiment value", "sentiment": 12 } ] '`
+- invalid json structure: `curl -X POST http://localhost:8083/generatePDF -H 'Content-Type: application/json' -d '[ { "name1": "A term with invalid json format", "sentiment": 0.5 } ] '`
\ No newline at end of file