Accounting system with possibility to add invoices, calculate taxes, generate PDFs and send emails. There are multiple implementations of databases provided to exercise various concepts: sql, no-sql, custom file database. The Project contains 8 various REST services, over 295 test cases and over 27618 lines of code with 80% test coverage.
Built with
- Maven
- Spring
- Spring boot
- Swagger
- Jacoco
- Mockito
- JUnit
- JUnit Params
- Json
- Jackson
- PostgreSQL
- Hibernate
- MongoDB
- Lombok
- REST Assured
- GreenMail
- iText
- Thymeleaf
- Gradle
- Using JDK 1.8 is recomended. Project was test on this JDK version.
1) Open project with your IDE eg. IntellJI, Eclipse
2) Set checkstyle to google-checkstyle
3) Generate binding classes fromsrc\main\resources\invoice.xsd
.
Run Maven-compile or use command 'xjc -d src -p com.example.xjc example.xsd' in terminal
4) You can run Maven-verify to check, if project builds correctly.
In application you can choose between six databases:
-
InFile
-
Multifile
-
Mongo
-
Mongo embedded
-
SQL (JDBC)
-
SQL (Hibernate)
-
and InMemmory database (set by default).
private static final String IN_FILE = "inFile"; private static final String MULTIFILE = "multifile"; private static final String MONGO = "mongo"; private static final String MONGO_EMB = "mongo_emb"; private static final String SQL_DB = "sql_db";
You can change the database in 'application.properties` file
pl.coderstrust.database.MasterDatabase=mongo_emb
pl.coderstrust.database.FilterDatabase=mongo_emb
Start the application and open the URL for API Documentation http://localhost:8080/swagger-ui.html
We have three different types of tests : JUnit, integrations, and E2E tests.
To run e2e tests :
1) Run main application
2) Build E2E project from gradle build file ( /e2e/build.gradle ) as separate project.
3) Enable annotation processing for lombok.
4) Run e2e tests as TestNG.