patterntesting.runtime.dbc
Class DbC

Package class diagram package DbC
java.lang.Object
  extended by patterntesting.runtime.dbc.DbC

public final class DbC
extends Object

Author:
oliver

Method Summary
static void ensure(boolean postcondition)
          Use this method to describe the condition which must be true when the preconditions were true and your method is finished.
static void ensure(boolean postcondition, Object message)
          Use this method to describe the condition which must be true when the preconditions were true and your method is finished.
static void require(boolean precondition)
          Use this method to describe the condition which must be true when your method is called.
static void require(boolean precondition, Object message)
          Use this method to describe the condition which must be true when your method is called.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

require

public static void require(boolean precondition)
Use this method to describe the condition which must be true when your method is called.

Parameters:
precondition - e.g. (arg0 != null)

require

public static void require(boolean precondition,
                           Object message)
Use this method to describe the condition which must be true when your method is called.

Parameters:
precondition - e.g. (arg0 != null)
message - e.g. "null argument is not allowed"

ensure

public static void ensure(boolean postcondition)
Use this method to describe the condition which must be true when the preconditions were true and your method is finished.

Parameters:
postcondition - e.g. (value > 0)

ensure

public static void ensure(boolean postcondition,
                          Object message)
Use this method to describe the condition which must be true when the preconditions were true and your method is finished.

Parameters:
postcondition - e.g. (value > 0)
message - e.g. "value must be positive"


Copyright © 2002–2014 PatternTesting Team. All rights reserved.