-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathunitTest
More file actions
executable file
·44 lines (44 loc) · 5.26 KB
/
unitTest
File metadata and controls
executable file
·44 lines (44 loc) · 5.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
echo -- no parameters -----------------------------
curl -X GET -w "\n\nstatus code => %{http_code}\n\ncontent type => %{content_type}\n\n" "http://localhost:8080/tox/nepsbx1.test.alive" > test1.html
echo -- 1 parameter -------------------------------
curl -X GET -w "\n\nstatus code => %{http_code}\n\ncontent type => %{content_type}\n\n" "http://localhost:8080/tox/nepsbx1.test.formatted?in_mask=YYYYMMDD" > test2.html
echo -- 3 parameters ------------------------------
curl -X GET -w "\n\nstatus code => %{http_code}\n\ncontent type => %{content_type}\n\n" "http://localhost:8080/tox/nepsbx1.test.formatted?in_maskIn=mm/dd/yyyy&in_date=07/17/1961&in_maskOut=YYYYMMDD" > test3.html
echo -- 1 parameter, XML output -------------------
curl -X GET -w "\n\nstatus code => %{http_code}\n\ncontent type => %{content_type}\n\n" "http://localhost:8080/tox/nepsbx1.test.formatted?in_mask=YYYYMMDD&outputFormat=XML" > test4.html
echo -- 1 parameter, XML output, XSL transform ----
curl -X GET -w "\n\nstatus code => %{http_code}\n\ncontent type => %{content_type}\n\n" "http://localhost:8080/tox/nepsbx1.test.formatted?in_mask=YYYYMMDD&outputFormat=XML&outputXform=http://localhost:8080/testing/xslt/test.xsl" > test5.html
echo -- 1 parameter, XSL transform ----------------
curl -X GET -w "\n\nstatus code => %{http_code}\n\ncontent type => %{content_type}\n\n" "http://localhost:8080/tox/nepsbx1.test.formatted?in_mask=YYYYMMDD&outputXform=http://localhost:8080/testing/xslt/test.xsl" > test6.html
echo -- 1 parameter, JSON output ------------------
curl -X GET -w "\n\nstatus code => %{http_code}\n\ncontent type => %{content_type}\n\n" "http://localhost:8080/tox/nepsbx1.test.formatted?in_mask=YYYYMMDD&outputFormat=JSON" > test7.html
echo -- 1 parameter, JSON output ------------------
curl -X GET -w "\n\nstatus code => %{http_code}\n\ncontent type => %{content_type}\n\n" "http://localhost:8080/tox/nepsbx1.test.formatted?in_mask=YYYYMMDD&outputFormat=JSON&outputXform=http://localhost:8080/testing/xslt/test.xsl" > test8.html
echo -- no parameters, POST payload ---------------
curl -X POST -d '<root><date yyyymmdd="19690720"/></root>' -w "\n\nstatus code => %{http_code}\n\ncontent type => %{content_type}\n\n" "http://localhost:8080/tox/nepsbx1.test.echo" > test9.html
echo -- no parameters, POST payload, JSON output --
curl -X POST -d '<root><date yyyymmdd="19690720"/></root>' -w "\n\nstatus code => %{http_code}\n\ncontent type => %{content_type}\n\n" "http://localhost:8080/tox/nepsbx1.test.echo?outputFormat=JSON" > test10.html
echo -- no parameters, POST payload, JSON input --
curl -X POST -d '{"root":{"date":{"yyyymmdd":19690720}}}' -w "\n\nstatus code => %{http_code}\n\ncontent type => %{content_type}\n\n" "http://localhost:8080/tox/nepsbx1.test.echo?inputFormat=JSON&inputXform=http://localhost:8080/testing/xslt/attr.xsl" > test11.html
echo -- no parameters, POST payload, JSON input, JSON output --
curl -X POST -d '{"root":{"date":{"yyyymmdd":19690720}}}' -w "\n\nstatus code => %{http_code}\n\ncontent type => %{content_type}\n\n" "http://localhost:8080/tox/nepsbx1.test.echo?outputFormat=JSON&inputFormat=JSON&inputXform=http://localhost:8080/testing/xslt/attr.xsl" > test12.html
echo -- 1 parameter, XML output, XSL transform with parameters --
curl -X GET -w "\n\nstatus code => %{http_code}\n\ncontent type => %{content_type}\n\n" "http://localhost:8080/tox/nepsbx1.test.formatted?in_mask=YYYYMMDD&outputXform=http://localhost:8080/testing/xslt/test.xsl(title=parameters,host=nowhere.org)" > test13.html
echo -- not implemented, expect error -------------
curl -X GET -w "\n\nstatus code => %{http_code}\n\ncontent type => %{content_type}\n\n" "http://localhost:8080/tox/nepsbx1.test.pineapple" > test14.html
echo -- no pl/sql, expect error and version -------------------
curl -X GET -w "\n\nstatus code => %{http_code}\n\ncontent type => %{content_type}\n\n" "http://localhost:8080/tox/" > test15.html
echo -- convert XML to JSON -------------------
curl -X GET -w "\n\nstatus code => %{http_code}\n\ncontent type => %{content_type}\n\n" "http://localhost:8080/tox/nepsbx1.test.testXml?outputFormat=JSON&in_root=asJson" > test16.html
echo -- specify XML as XML -------------------
curl -X GET -w "\n\nstatus code => %{http_code}\n\ncontent type => %{content_type}\n\n" "http://localhost:8080/tox/nepsbx1.test.testXml?outputFormat=XML&in_root=asXml" > test17.html
echo -- default XML as XML -------------------
curl -X GET -w "\n\nstatus code => %{http_code}\n\ncontent type => %{content_type}\n\n" "http://localhost:8080/tox/nepsbx1.test.testXml?in_root=asDefault" > test18.html
echo -- set MEDIA-TYPE convert to TEXT -------------------
curl -X GET -w "\n\nstatus code => %{http_code}\n\ncontent type => %{content_type}\n\n" "http://localhost:8080/tox/nepsbx1.test.testXml?in_root=toText&outputXform=http://localhost:8080/testing/xslt/text.xsl" > test19.html
echo -- default XML as TEXT -------------------
curl -X GET -w "\n\nstatus code => %{http_code}\n\ncontent type => %{content_type}\n\n" "http://localhost:8080/tox/nepsbx1.test.testText" > test20.html
echo -- set TEXT as TEXT -------------------
curl -X GET -w "\n\nstatus code => %{http_code}\n\ncontent type => %{content_type}\n\n" "http://localhost:8080/tox/nepsbx1.test.testText?outputFormat=TEXT" > test21.html
echo -----------------------------------------------