Spec project: Bank Account

A relatively simple bank account application with data and function specifications, including generative testing data and function instrumentation.

Under active development

Create deps.edn project

Use Clojure CLI and clj-new

clojure -M:new app practicalli/banking-on-clojure

practicalli/banking-on-clojure repository

practicalli/banking-on-clojure repository contains the latest code to date for this project.

Outline design of project

Data Specifications are created for

  • Customer Details
  • Account holder
  • Bank account
  • Multiple Bank accounts
  • Credit Card
  • Mortgage

Functions and specifications are created for

  • register-account-holder
  • open-credit-account
  • open-savings-account
  • open-credit-card-account
  • open-mortgage-account
  • Make a payment
  • Send account notification
  • Check for overdraft

Development Workflow

  • Write a failing test
  • write mock data
  • write an function definition that returns the argument
  • run tests - tests should fail
  • write a spec for the functions argument - customer
  • write a spec for the return value
  • write a spec for relationship between args and return value
  • replace the mock data with generated values from specification
  • update functions and make tests pass
  • instrument functions
  • run specification checks

Images to add

Running tests that fail on a spec in CIDER spacemacs-cider-test-spec-fail-banking-on-clojure-project.png

Running tests that fail on a spec on CircleCI circle-ci-banking-on-clojure-spec-test-runner-fail-register-account-holder-did-not-conform-to-spec.png

results matching ""

    No results matching ""