Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xgouchet/mesmaeker
A Contract Based Testing framework for java / kotlin
https://github.com/xgouchet/mesmaeker
Last synced: 10 days ago
JSON representation
A Contract Based Testing framework for java / kotlin
- Host: GitHub
- URL: https://github.com/xgouchet/mesmaeker
- Owner: xgouchet
- License: other
- Created: 2017-09-14T18:02:22.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2021-08-25T12:06:31.000Z (over 3 years ago)
- Last Synced: 2024-11-09T00:31:29.363Z (2 months ago)
- Language: Kotlin
- Size: 85.9 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Mesmaeker
> Mesmaeker is a library providing tools for Contract based testing in the JVM
[![license](https://img.shields.io/github/license/mashape/apistatus.svg)](https://opensource.org/licenses/MIT)
[![Kotlin 1.1.4-2](https://img.shields.io/badge/Kotlin-1.1.4--2-blue.svg)](http://kotlinlang.org)I (try to) write a lot of unit tests in my various projects, and use a lot of mocks. The problem with mocks is that they
tend to be totally disconnected from the implementation they represent.Because a subject's behavior is described by the tests using it, how can we be sure that it does represent how the real
implementation will behave ?That's how Contract based testing, and Mesmaeker, can help. The basic idea goes like this. Say you have a class A, and a
class B using instances of A. When testing B, instead of using subject instances of A, that will behave to make the tests of
B pass, you're going to use a subject generated by a Contract class. And when you're testing class A, you can use the contract
class to verify that the implementation follows the same contract as the mocks.