org.virtualmock.rule
Class AllRecordedCallsMustBeInvokedRule

java.lang.Object
  extended byorg.virtualmock.rule.AllRecordedCallsMustBeInvokedRule
All Implemented Interfaces:
Rule

public class AllRecordedCallsMustBeInvokedRule
extends java.lang.Object
implements Rule

Implementation of the Rule: ALL_RECORDED_CALLS_MUST_BE_INVOKED.

Version:
$Revision: 1.15 $
Author:
Chad Woolley

Field Summary
 
Fields inherited from interface org.virtualmock.rule.Rule
FAIL, IGNORE, WARN
 
Constructor Summary
AllRecordedCallsMustBeInvokedRule(java.lang.String key, int enforcementLevel, CallManager callManager, ResourceManager resourceManager)
          Constructor.
 
Method Summary
 int getEnforcementLevel()
          Accessor.
 java.lang.String getKey()
          Accessor.
protected  java.lang.String getViolationMessage(RecordedCall recordedCall)
          Get a single violation message.
 java.lang.String[] getViolationMessages()
          Gets violation messages for this rule.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AllRecordedCallsMustBeInvokedRule

public AllRecordedCallsMustBeInvokedRule(java.lang.String key,
                                         int enforcementLevel,
                                         CallManager callManager,
                                         ResourceManager resourceManager)
Constructor.

Parameters:
key - the key for this rule
enforcementLevel - the enforcementLevel for this rule
callManager - the CallManager, which will be used internally by this rule
resourceManager - the ResourceManager, which will be used internally by this rule
Method Detail

getEnforcementLevel

public int getEnforcementLevel()
Accessor.

Specified by:
getEnforcementLevel in interface Rule
Returns:
the enforcementLevel for this rule

getKey

public java.lang.String getKey()
Accessor.

Specified by:
getKey in interface Rule
Returns:
the key

getViolationMessages

public java.lang.String[] getViolationMessages()
Gets violation messages for this rule.

Specified by:
getViolationMessages in interface Rule
Returns:
a string array of violation messages, if any exist

getViolationMessage

protected java.lang.String getViolationMessage(RecordedCall recordedCall)
Get a single violation message.

Parameters:
recordedCall - the recorded call to which the message applies
Returns:
the formatted violation message


Copyright © 2003-2005 Virtual Mock. All Rights Reserved.