Skip to content

Commit

Permalink
Change group ID to org.qubitpi.athena
Browse files Browse the repository at this point in the history
  • Loading branch information
QubitPi committed Jan 12, 2024
1 parent 16041f1 commit c02f789
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions docs/pages/guide/v1/03-jsonapi.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@ Athena supports two mechanisms by which a newly uploaded file is assigned an ID:
> For more info on custom binding, please checkout
> [Basic Dependency Injection using Jersey's HK2]({{site.baseurl}}/pages/guide/v{{ page.version }}/16-jersey-di-using-hk2.html)
[FileNameAndUploadedTimeBasedIdGenerator]: https://github.com/QubitPi/athena/blob/master/athena-core/src/main/java/com/qubitpi/athena/file/identifier/FileNameAndUploadedTimeBasedIdGenerator.java
[FileIdGenerator]: https://github.com/QubitPi/athena/blob/master/athena-core/src/main/java/com/qubitpi/athena/file/identifier/FileIdGenerator.java
[AbstractBinderFactory]: https://github.com/QubitPi/athena/blob/master/athena-core/src/main/java/com/qubitpi/athena/application/AbstractBinderFactory.java
[FileNameAndUploadedTimeBasedIdGenerator]: https://github.com/QubitPi/athena/blob/master/athena-core/src/main/java/org/qubitpi/athena/file/identifier/FileNameAndUploadedTimeBasedIdGenerator.java
[FileIdGenerator]: https://github.com/QubitPi/athena/blob/master/athena-core/src/main/java/org/qubitpi/athena/file/identifier/FileIdGenerator.java
[AbstractBinderFactory]: https://github.com/QubitPi/athena/blob/master/athena-core/src/main/java/org/qubitpi/athena/application/AbstractBinderFactory.java
4 changes: 2 additions & 2 deletions docs/pages/guide/v1/08-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,9 @@ The tests contain 2 parts
[Flyway migration](../../../../athena-examples/athena-example-books/src/test/groovy/com/qubitpi/athena/example/books/application/SQLDBResourceManager.groovy)
injects real data into a Derby in-meomroy SQL DB
- The Derby data is injected via a shared [DBCP DataSource](#reference---apache-commons-dbcp2) declared in
[application BinderFactory](../../../../athena-examples/athena-example-books/src/main/java/com/qubitpi/athena/example/books/application/BooksBinderFactory.java)
[application BinderFactory](../../../../athena-examples/athena-example-books/src/main/java/org/qubitpi/athena/example/books/application/BooksBinderFactory.java)
- The application resource is set alive through
[JerseyTestBinder](../../../../athena-examples/athena-example-books/src/test/java/com/qubitpi/athena/example/books/application/BookJerseyTestBinder.java)
[JerseyTestBinder](../../../../athena-examples/athena-example-books/src/test/java/org/qubitpi/athena/example/books/application/BookJerseyTestBinder.java)

### Reference - Apache Commons DBCP2

Expand Down
16 changes: 8 additions & 8 deletions docs/pages/guide/v1/14-test.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ Servlet Testing Documentation
>
> One noticeable deviation is that since some of Fili's classes have made it possible for themselves to be mutable,
> which Athena doesn't do, the stubbing is defined not on these classes, but on
> [ApplicationState](../../../../athena-core/src/test/java/com/qubitpi/athena/application/ApplicationState.java), which
> [ApplicationState](../../../../athena-core/src/test/java/org/qubitpi/athena/application/ApplicationState.java), which
> is a modified adaption of Fili ApplicationState
[Servlet-related testing](https://github.com/QubitPi/athena/tree/master/athena-core/src/main/java/com/qubitpi/athena/web/endpoints)
[Servlet-related testing](https://github.com/QubitPi/athena/tree/master/athena-core/src/main/java/org/qubitpi/athena/web/endpoints)
is carried out using
[Jersey Test Framework](https://qubitpi.github.io/jersey/test-framework.html).

Expand All @@ -44,7 +44,7 @@ follows the following pattern to setup, run, and shutdown tests:
### 1. Initialize ApplicationState

Test specs initializes test data and mocking through
[ApplicationState](../../../../athena-core/src/test/java/com/qubitpi/athena/application/ApplicationState.java) in
[ApplicationState](../../../../athena-core/src/test/java/org/qubitpi/athena/application/ApplicationState.java) in
`setup()`

```groovy
Expand Down Expand Up @@ -77,7 +77,7 @@ Executing the statement above will start a [Grizzly container](https://javaee.gi
endpoints are ready to receive test requests.

> 📋 When writing tests for
> [FileServlet](../../../../athena-core/src/main/java/com/qubitpi/athena/web/endpoints/FileServlet.java), make sure
> [FileServlet](../../../../athena-core/src/main/java/org/qubitpi/athena/web/endpoints/FileServlet.java), make sure
> `MultiPartFeature.class` is also passed in as a
> resource class since the file uploading involves a separate Jersey component enabled by it. For example:
>
Expand All @@ -94,12 +94,12 @@ jerseyTestBinder.start()
```
Internally
[JerseyTestBinder](../../../../athena-core/src/test/java/com/qubitpi/athena/application/JerseyTestBinder.java) sets
[TestBinderFactory](../../../../athena-core/src/test/java/com/qubitpi/athena/application/TestBinderFactory.java) to
[JerseyTestBinder](../../../../athena-core/src/test/java/org/qubitpi/athena/application/JerseyTestBinder.java) sets
[TestBinderFactory](../../../../athena-core/src/test/java/org/qubitpi/athena/application/TestBinderFactory.java) to
bind those data and behaviors into the actual test

> Note that the
> [JerseyTestBinder](../../../../athena-core/src/test/java/com/qubitpi/athena/application/JerseyTestBinder.java)
> [JerseyTestBinder](../../../../athena-core/src/test/java/org/qubitpi/athena/application/JerseyTestBinder.java)
> creates separate container for each test. Setup method is named `setup()` and teardown method `cleanup()` by Groovy
> Spock convention.
Expand Down Expand Up @@ -150,7 +150,7 @@ failed during application initialization.
```

Athena uses ResourceConfig type for configuration. We need to register the `MultiPartFeature`. Instead of using
[Athena ResourceConfig](../../../../athena-core/src/main/java/com/qubitpi/athena/application/ResourceConfig.java),
[Athena ResourceConfig](../../../../athena-core/src/main/java/org/qubitpi/athena/application/ResourceConfig.java),
servlet test spec configures with the native
[Jersey ResourceConfig](https://github.com/eclipse-ee4j/jersey/blob/master/core-server/src/main/java/org/glassfish/jersey/server/ResourceConfig.java).
The reason is so that we could bind certain resource classes that we only need in a test spec to enhance test
Expand Down

0 comments on commit c02f789

Please sign in to comment.