junitx.ddtunit.data
Class AssertObject

java.lang.Object
  extended by junitx.ddtunit.data.TypedObject
      extended by junitx.ddtunit.data.AssertObject
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
ExceptionAsserter, ObjectAsserter

public abstract class AssertObject
extends TypedObject

Author:
jg

Field Summary
protected  String action
           
protected  Object actualObject
           
protected  boolean actualObjectSet
           
protected  String actualType
           
protected  boolean markAsProcessed
           
 
Fields inherited from class junitx.ddtunit.data.TypedObject
UNKNOWN_TYPE
 
Constructor Summary
AssertObject(String id, String type, String action)
           
 
Method Summary
 String getAction()
           
 Object getActualObject()
           
protected  String getActualType()
           
 void setActualObject(Object actualObject)
          Associate actual and expected object.
 String toString()
           
abstract  void validate(boolean mark)
          Process assertion specified in this object.
 
Methods inherited from class junitx.ddtunit.data.TypedObject
clone, equals, getId, getType, getValue, hashCode, setId, setType, setValue
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

action

protected String action

actualObject

protected Object actualObject

actualType

protected String actualType

actualObjectSet

protected boolean actualObjectSet

markAsProcessed

protected boolean markAsProcessed
Constructor Detail

AssertObject

public AssertObject(String id,
                    String type,
                    String action)
Parameters:
id -
type -
Method Detail

validate

public abstract void validate(boolean mark)
Process assertion specified in this object. Should throw exception on assert failure.


getAction

public String getAction()

getActualObject

public Object getActualObject()

setActualObject

public void setActualObject(Object actualObject)
Associate actual and expected object.
If actual and expected object are not of same class type an exception is thrown

Parameters:
actualObject -

getActualType

protected String getActualType()
Returns:

toString

public String toString()
Overrides:
toString in class TypedObject


Copyright © 2004-2011. All Rights Reserved.