Skip to content

Commit 7618cb6

Browse files
refactored ToC
1 parent 7911eb5 commit 7618cb6

2 files changed

Lines changed: 62 additions & 36 deletions

File tree

documentation/Assertions.md

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,41 @@
11
## Assertions
22
The following assertions are already implemented:
3-
:toc:
4-
:toc-title:
3+
* [directoryExist](#directoryExist)
4+
* [directoryNotEmpty](#directoryNotEmpty)
5+
* [fileExist](#fileExist)
6+
* [fileContains](#fileContains)
7+
* [noErrorCode](#noErrorCode)
8+
* [noException](#noExceptions)
9+
* [repositoryIsClean](#repositoryIsClean)
10+
* [serverIsReachable](#serverIsReachable)
511

612
***
713

8-
### directoryExist
14+
### directoryExist <a name="directoryExist"></a>
915
#### description
1016
Checks if a given path leads to an existing directory.
1117
#### parameter
1218
1. Path as a string, which should lead to an existing directory.
1319

1420
***
1521

16-
### directoryNotEmpty
22+
### directoryNotEmpty <a name="directoryNotEmpty"></a>
1723
#### description
1824
Checks if a given directory contain at least one file or subdirectory.
1925
#### parameter
2026
1. Path as a string of a directory.
2127

2228
***
2329

24-
### fileExist
30+
### fileExist <a name="fileExist"></a>
2531
#### description
2632
Checks if a given path leads to an existing file.
2733
#### parameter
2834
1. Path as a string
2935

3036
***
3137

32-
### fileContains
38+
### fileContains <a name="fileContains"></a>
3339
#### description
3440
Checks if content is included in a file
3541
#### parameter
@@ -38,31 +44,31 @@ Checks if content is included in a file
3844

3945
***
4046

41-
### noErrorCode
47+
### noErrorCode <a name="noErrorCode"></a>
4248
#### description
4349
Checks if the given RunResult has an returnCode of 0 otherwise throwing Error.
4450
#### parameter
4551
1. RunResult
4652

4753
***
4854

49-
### noException
55+
### noException <a name="noException"></a>
5056
#### description
5157
Checks if the given RunResult's exception Array is empty otherwise throwing Error.
5258
#### parameter
5359
1. RunResult
5460

5561
***
5662

57-
### repositoryIsClean
63+
### repositoryIsClean <a name="repositoryIsClean"></a>
5864
#### description
5965
Checks if the given directory is a git repository and is clean, meaning there are no uncommited changes.
6066
#### parameter
6167
1. Path of a directory as a string.
6268

6369
***
6470

65-
### serverIsReachable
71+
### serverIsReachable <a name="serverIsReachable"></a>
6672
#### description
6773
Checks if a server is available on localhost.
6874
#### parameter

documentation/Functions.md

Lines changed: 46 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,31 @@
11
## Functions
22
The following functions are already implemented:
3-
:toc:
4-
:toc-title:
3+
* [installDevonfwIde](#installDevonfwIde)
4+
* [restoreDevonfwIde](#restoreDevonfwIde)
5+
* [restoreWorkspace](#restoreWorkspace)
6+
* [changeWorkspace](#changeWorkspace)
7+
* [executeCommand](#executeCommand)
8+
* [installCobiGen](#installCobiGen)
9+
* [cobiGenJava](#cobiGenJava)
10+
* [createDevon4jProject](#createDevon4jProject)
11+
* [buildJava](#buildJava)
12+
* [createFile](#createFile)
13+
* [changeFile](#changeFile)
14+
* [createFolder](#createFolder)
15+
* [cloneRepository](#cloneRepository)
16+
* [runServerJava](#runServerJava)
17+
* [buildNg](#buildNg)
18+
* [npmInstall](#npmInstall)
19+
* [dockerCompose](#dockerCompose)
20+
* [downloadFile](#downloadFile)
21+
* [nextKatacodaStep](#nextKatacodaStep)
22+
* [adaptTemplatesCobiGen](#adaptTemplatesCobiGen)
23+
* [createDevon4ngProject](#createDevon4ngProject)
24+
* [addSetupScript](#addSetupScript)
525

626
***
727

8-
### installDevonfwIde
28+
### installDevonfwIde <a name="installDevonfwIde"></a>
929
#### parameter
1030
1. The tools you want to install within the devonfw ide: string array
1131
2. Optional: The version of the ide to install
@@ -14,7 +34,7 @@ installDevonfwIde(["java","mvn"], "2020.08.001")
1434

1535
***
1636

17-
### restoreDevonfwIde
37+
### restoreDevonfwIde <a name="restoreDevonfwIde"></a>
1838
#### parameter
1939
1. The tools you want to install within the devonfw ide: string array
2040
2. Optional: The version of the ide to install
@@ -24,7 +44,7 @@ restoreDevonfwIde(["java","mvn"], "2020.08.001")
2444
In the Katacoda environment the installation of the devonfw IDE is executed in a startup script.
2545
***
2646

27-
### restoreWorkspace
47+
### restoreWorkspace <a name="restoreWorkspace"></a>
2848
#### parameter
2949
1. (Optional) Name of the workspace repository {"workspace": string} (Default is the playbook-name)
3050

@@ -86,7 +106,7 @@ will run "git clone https://github.com/[GitHub-name]/[playbook-name]" and checko
86106
Learn more about the workspace directory and working directory on [Structure](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Structure)
87107

88108
89-
### changeWorkspace
109+
### changeWorkspace <a name="changeWorkspace"></a>
90110
#### parameter
91111
1. path to a new workspace (relative to working directory)
92112
#### example
@@ -95,7 +115,7 @@ will set the workspace directory to "[working directory]/devonfw/workspaces/proj
95115

96116
Learn more about the workspace directory and working directory on [Structure](https://github.com/devonfw-tutorials/tutorial-compiler/wiki/Structure)
97117

98-
### executeCommand
118+
### executeCommand <a name="executeCommand"></a>
99119
#### parameter
100120
1. The command that will be executed on Windows
101121
2. The command that will be executed on Linux
@@ -130,15 +150,15 @@ executeCommand("someServerScript.ps1","bash someServerScript.sh", {"asynchronous
130150
Starting a server in a new terminal. You have to specify the port for testing, the other parameters are optional. The startupTime can specify how long the runner will wait for a response from the server process and with interval you can set the frequenzy for the server testing. The path is the subpath from your server that should be reached.
131151

132152

133-
### installCobiGen
153+
### installCobiGen <a name="installGobiGen"></a>
134154
#### parameter
135155
* No parameters
136156
#### example
137157
installCobiGen()
138158

139159
***
140160

141-
### cobiGenJava
161+
### cobiGenJava <a name="cobiGenJava"></a>
142162
#### parameter
143163
1. The path to the java file you want to generate code for: string
144164
2. The numbers that represent the templates that CobiGen uses to generate code: int array
@@ -155,7 +175,7 @@ cobiGenJava("path/to/java/file/MyEntity.java",[1,3,5,6,8])
155175

156176
***
157177

158-
### createDevon4jProject
178+
### createDevon4jProject <a name="createDevon4jProject"></a>
159179
#### parameter
160180
1. The base package name
161181
#### example
@@ -164,7 +184,7 @@ createDevon4jProject("com.mycustomer.myapplication")
164184

165185
***
166186

167-
### buildJava
187+
### buildJava <a name="buildJava"></a>
168188
#### parameter
169189
1. The project directory
170190
2. (Optional) Indicator whether tests should be run. Default is false.
@@ -173,7 +193,7 @@ buildJava("cobigenexample", true)
173193

174194
***
175195

176-
### createFile
196+
### createFile <a name="createFile"></a>
177197
#### parameter
178198
1. Path of the file to be created (relative path to the workspace directory)
179199
2. (Optional) Path of the file to get the content from. Relative to the playbook directory
@@ -182,7 +202,7 @@ createFile("cobigenexample/core/src/main/java/com/example/application/cobigenexa
182202

183203
***
184204

185-
### changeFile
205+
### changeFile <a name="changeFile"></a>
186206
#### parameter
187207
1. Path of the file to be changed (relative path to the workspace directory)
188208
2.
@@ -223,15 +243,15 @@ The option to insert at a linenumber uses a placeholder inserted by a script and
223243

224244
***
225245

226-
### createFolder
246+
### createFolder <a name="createFolder"></a>
227247
#### parameter
228248
1. Path of the folder to be created, relative to the workspace directory. Subdirectories are also created.
229249
#### example
230250
createFolder("directoryPath/subDirectory")
231251

232252
***
233253

234-
### cloneRepository
254+
### cloneRepository <a name="cloneRepository"></a>
235255
#### parameter
236256
1. Path into which the repository is to be cloned, relative to workspace.
237257
2. Git repository URL
@@ -245,7 +265,7 @@ Repository will be cloned into a newly created subdirectory devonfw-tutorials.
245265
***
246266

247267

248-
### runServerJava
268+
### runServerJava <a name="runServerJava"></a>
249269
#### parameter
250270
1. Path to the server directory within the java project.
251271
2. Assertion information. Only needed for the console runner to check if the server was started properly.
@@ -260,7 +280,7 @@ path: The URL path on which is checked if the server is running
260280
If the tutorial should be tested on the console environment, you have to specify a port.
261281
***
262282

263-
### npmInstall
283+
### npmInstall <a name="npmInstall"></a>
264284
#### parameter
265285
1. Path to the project where the dependencies from the package.json file are to be installed.
266286
2. Json-object: Name of a package, global or local installation, or array of npm arguments
@@ -276,7 +296,7 @@ will run 'npm install' in the directory 'my-thai-star/angular'
276296

277297
***
278298

279-
### dockerCompose
299+
### dockerCompose <a name="dockerCompose"></a>
280300
#### parameter
281301
1. Path to the directory where the docker-compose.yml file is located, relative to workspace.
282302
2. Assertion information. Only needed for the console runner to check if the server was started properly.
@@ -291,7 +311,7 @@ path: The URL path on which is checked if the server is running
291311
If the tutorial should be tested on the console environment, you have to specify a port.
292312
***
293313

294-
### downloadFile
314+
### downloadFile <a name="downloadFile"></a>
295315
#### parameter
296316
1. URL of the file to be downloaded.
297317
2. Name of file.
@@ -301,7 +321,7 @@ downloadFile("https://bit.ly/2BCkFa9", "file", "downloads")
301321

302322
***
303323

304-
### buildNg
324+
### buildNg <a name="buildNg"></a>
305325
#### parameter
306326
1. Path to the angular project relative to workspace
307327
2. (Optional) Custom output directory.
@@ -314,7 +334,7 @@ Will build the angular project to output directory testOutput.
314334

315335
***
316336

317-
### runClientNg
337+
### runClientNg <a name="runClientNg"></a>
318338
#### parameter
319339
1. Path to the angular project from which the frontend server is to be started.
320340
2. Assertion information. Only needed for the console runner to check if the server was started properly.
@@ -329,7 +349,7 @@ path: The URL path on which is checked if the server is running
329349
If the tutorial should be tested on the console environment, you have to specify a port.
330350
***
331351

332-
### nextKatacodaStep
352+
### nextKatacodaStep <a name="nextKatacodaStep"></a>
333353
#### parameter
334354
1. The title of the step.
335355
2. An array of json objects with files, content, or images to be rendered within the katacoda step.
@@ -346,15 +366,15 @@ image: Path to an image to be displayed in the katacoda step.
346366

347367
***
348368

349-
### adaptTemplatesCobiGen
369+
### adaptTemplatesCobiGen <a name="adaptTemplatesCobiGen"></a>
350370
#### parameter
351371
* No parameters
352372
#### example
353373
adaptTemplatesCobiGen()
354374

355375
***
356376

357-
### createDevon4ngProject
377+
### createDevon4ngProject <a name="createDevon4ngProject"></a>
358378
#### parameter
359379
1. Name of the Project.
360380
2. Path to where the Project should be created (relative to workspace). Folder should exist.
@@ -371,7 +391,7 @@ This command also works if the devonfw IDE is not installed, but then you have t
371391

372392
***
373393

374-
### addSetupScript
394+
### addSetupScript <a name="addSetupScript"></a>
375395
#### parameter
376396
1. Path of the script (Linux). Relative to the playbook directory
377397
2. Path of the script (Windows). Relative to the playbook directory
@@ -381,7 +401,7 @@ addSetupScript("assets/createProjectScript.sh", "assets/createProjectScript.ps1"
381401

382402
***
383403

384-
### openFile
404+
### openFile <a name="openFile"></a>
385405
#### parameter
386406
1. Path of the file to be opened (relative path to the workspace directory)
387407

0 commit comments

Comments
 (0)