Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions webtau-docs/pre-filter/maven/server-dep.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<dependency>
<groupId>org.testingisdocumenting.webtau</groupId>
<artifactId>webtau-server</artifactId>
<version>${project.version}</version>
</dependency>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* Doc: [servers import](servers/import-and-dependencies)
2 changes: 2 additions & 0 deletions webtau-docs/znai/servers/fake-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ Groovy:
title: "fake server creation example",
surroundedBy: "router-example"
}
:include-markdown: import-ref.md

Java:
:include-file: com/example/tests/junit5/FakeServerJavaTest.java {
title: "fake server creation example",
surroundedBy: "router-example"
}
:include-markdown: import-ref.md
```

# Fake Server Creation
Expand Down
15 changes: 15 additions & 0 deletions webtau-docs/znai/servers/import-and-dependencies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
:include-markdown: imports/single-dsl-import.md

# Server Specific Import

To only import `server` module use

```tabs
Groovy:
:include-file: com/example/tests/junit5/FakeServerJavaTest.java {title: "server import", include: "WebTauServerFacade.server", replace: [";", ""]}
:include-file: maven/server-dep.xml {title: "maven dependency"}

Java:
:include-file: com/example/tests/junit5/FakeServerJavaTest.java {title: "server import", include: "WebTauServerFacade.server"}
:include-file: maven/server-dep.xml {title: "maven dependency"}
```
1 change: 1 addition & 0 deletions webtau-docs/znai/servers/import-ref.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Check [Import And Dependencies](servers/import-and-dependencies) for prerequisites.
2 changes: 2 additions & 0 deletions webtau-docs/znai/servers/server-router.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@ Groovy:
title: "router creation example",
surroundedBy: "router-example"
}
:include-markdown: import-ref.md

Java:
:include-file: com/example/tests/junit5/FakeServerJavaTest.java {
title: "router creation example",
surroundedBy: "router-example"
}
:include-markdown: import-ref.md
```

# Request Properties {style: "api"}
Expand Down
2 changes: 2 additions & 0 deletions webtau-docs/znai/servers/static-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ Groovy:
title: "create and start server",
surroundedBy: "static-server-create",
}
:include-markdown: import-ref.md

Java:
:include-file: com/example/tests/junit5/StaticServerJavaTest.java {
title: "create and start server",
surroundedBy: "static-server-create"
}
:include-markdown: import-ref.md
```

:include-file: data/staticcontent/data.json {autoTitle: true}
Expand Down
1 change: 1 addition & 0 deletions webtau-docs/znai/toc
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ servers
proxy-server
fake-server
server-router
import-and-dependencies
cli
introduction
foreground-command
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@

import java.util.regex.Pattern;

import static org.testingisdocumenting.webtau.WebTauDsl.*;
import static org.testingisdocumenting.webtau.WebTauCore.*;
import static org.testingisdocumenting.webtau.http.Http.*;
import static org.testingisdocumenting.webtau.server.WebTauServerFacade.server;

public class FakeServerJavaTest {
private static WebTauServer myServer;
Expand Down