Skip to content

Latest commit

 

History

History
80 lines (52 loc) · 2.02 KB

README.md

File metadata and controls

80 lines (52 loc) · 2.02 KB

Banking Kata - Java

CI

Overview

This project illustrates TDD & Clean Architecture implementation in Java, showing the Use Case Driven Development Approach.

We implement a Banking system with the following use cases:

  • Open account
  • Withdraw funds
  • Deposit funds
  • View account

Prerequisites

Environment variables

To be able to run the tests (since some of the tests are dependent on the database - the integration tests), we then need to set the environment variables.

In IntelliJ, for the Tests in 'banking-kata.test' configuration, you can copy this into the Environment variables

POSTGRES_URL=jdbc:postgresql://localhost:5432/banking_kata;POSTGRES_USER=postgres;POSTGRES_PASSWORD=admin

You need to have created the database, in the example I had created a database called banking_kata.

Please update the environment variable values based on your local settings.

Running build

Environment Variables

$env:POSTGRES_URL='jdbc:postgresql://localhost:5432/banking_kata'
$env:POSTGRES_USER='postgres'
$env:POSTGRES_PASSWORD='admin'

Running build with automated tests:

./gradlew build

Running JaCoCo code coverage:

./gradlew jacocoTestReport

Running PIT mutation testing:

./gradlew pitest

Reports

See the build\reports directory for the generated reports for test results, code coverage and mutation testing.

Reports:

  • build\reports\tests
  • build\reports\jacoco
  • build\reports\pitest

Contributing

If you'd like to contribute, see instructions here https://github.com/valentinacupac/banking-kata-java/blob/main/CONTRIBUTING.md