Skip to content

Commit eb36d4f

Browse files
committed
Added libraries needed for the training, basic tests to check setup in case of version bumps etc., cypress tests to check exercises, simple server implementation for http exercise, postman collection to check if server working fine, modified project structure to be ready for training.
1 parent f42e107 commit eb36d4f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+7062
-2739
lines changed

books.postman_collection.json

+183
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,183 @@
1+
{
2+
"info": {
3+
"_postman_id": "0fe1ff2a-78c1-4308-92d6-f7de66a299a9",
4+
"name": "books",
5+
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
6+
},
7+
"item": [
8+
{
9+
"name": "localhost:8080/api/books",
10+
"request": {
11+
"method": "GET",
12+
"header": [
13+
{
14+
"key": "Accept",
15+
"value": "application/json"
16+
}
17+
],
18+
"body": {},
19+
"url": {
20+
"raw": "localhost:8080/api/books",
21+
"host": [
22+
"localhost"
23+
],
24+
"port": "8080",
25+
"path": [
26+
"api",
27+
"books"
28+
]
29+
}
30+
},
31+
"response": []
32+
},
33+
{
34+
"name": "localhost:8080/api/book",
35+
"request": {
36+
"method": "POST",
37+
"header": [
38+
{
39+
"key": "Content-Type",
40+
"value": "application/json"
41+
},
42+
{
43+
"key": "Accept",
44+
"value": "application/json"
45+
}
46+
],
47+
"body": {
48+
"mode": "raw",
49+
"raw": "{\n\t\"authors\":\"BrazilJS (https://braziljs.org/)\",\n\t\"title\":\"JS the right way\"\n}"
50+
},
51+
"url": {
52+
"raw": "localhost:8080/api/book",
53+
"host": [
54+
"localhost"
55+
],
56+
"port": "8080",
57+
"path": [
58+
"api",
59+
"book"
60+
]
61+
},
62+
"description": "Save a book that is not yet present in the data set (no ID given)"
63+
},
64+
"response": []
65+
},
66+
{
67+
"name": "localhost:8080/api/book/{{bookId}}",
68+
"request": {
69+
"method": "GET",
70+
"header": [],
71+
"body": {},
72+
"url": {
73+
"raw": "localhost:8080/api/book/{{bookId}}",
74+
"host": [
75+
"localhost"
76+
],
77+
"port": "8080",
78+
"path": [
79+
"api",
80+
"book",
81+
"{{bookId}}"
82+
]
83+
},
84+
"description": "Get book by ID"
85+
},
86+
"response": []
87+
},
88+
{
89+
"name": "localhost:8080/api/search?text=java",
90+
"request": {
91+
"method": "GET",
92+
"header": [
93+
{
94+
"key": "Accept",
95+
"value": "application/json"
96+
}
97+
],
98+
"body": {},
99+
"url": {
100+
"raw": "localhost:8080/api/search?text=java",
101+
"host": [
102+
"localhost"
103+
],
104+
"port": "8080",
105+
"path": [
106+
"api",
107+
"search"
108+
],
109+
"query": [
110+
{
111+
"key": "text",
112+
"value": "java"
113+
}
114+
]
115+
}
116+
},
117+
"response": []
118+
},
119+
{
120+
"name": "localhost:8080/api/search/delay?text=java",
121+
"request": {
122+
"method": "GET",
123+
"header": [
124+
{
125+
"key": "Accept",
126+
"value": "application/json"
127+
}
128+
],
129+
"body": {},
130+
"url": {
131+
"raw": "localhost:8080/api/search/delay?text=java",
132+
"host": [
133+
"localhost"
134+
],
135+
"port": "8080",
136+
"path": [
137+
"api",
138+
"search",
139+
"delay"
140+
],
141+
"query": [
142+
{
143+
"key": "text",
144+
"value": "java"
145+
}
146+
]
147+
}
148+
},
149+
"response": []
150+
}
151+
],
152+
"event": [
153+
{
154+
"listen": "prerequest",
155+
"script": {
156+
"id": "82f9e513-e2b7-4c9b-85de-2efc8a298628",
157+
"type": "text/javascript",
158+
"exec": [
159+
""
160+
]
161+
}
162+
},
163+
{
164+
"listen": "test",
165+
"script": {
166+
"id": "76dd487b-00dd-4815-b862-8d2198158eb8",
167+
"type": "text/javascript",
168+
"exec": [
169+
""
170+
]
171+
}
172+
}
173+
],
174+
"variable": [
175+
{
176+
"id": "8381d655-2769-4550-8a0b-f7b1f1a2ce06",
177+
"key": "bookId",
178+
"value": "1",
179+
"type": "string",
180+
"description": ""
181+
}
182+
]
183+
}

cypress.json

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

cypress/fixtures/example.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"name": "Using fixtures to represent data",
3+
"email": "[email protected]",
4+
"body": "Fixtures are a great way to mock data for responses to routes"
5+
}

0 commit comments

Comments
 (0)