Menu

JPDBC / Blog: Recent posts

JPDBC in nutshell

Main features

  • no need to use preprocessors or java-agents
  • primary target in unit/component tests
  • contracts are defined with annotations: @Invariant, @Pre, @Post
  • contracts are evaluated using reflection and JavaScript engine
  • contracts can be evaluated for mock-objects

Simple example 1/2

In the following example MyManager uses interface MyInterface, but the implementor of MyManager has not honoured the contract @Pre("!=null"). (Fix for this could be e.g. using Google Guava's Strings.nullToEmpty in the callDo)... read more

Posted by Jari-Pekka Ryynänen 2013-09-30
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.