org.viewaframework.test
Class PropertyTrapper

java.lang.Object
  extended by org.viewaframework.test.PropertyTrapper
All Implemented Interfaces:
ApplicationTrapperAware, NumberAware, ViewTrapperAware, Trapper<Object>

public class PropertyTrapper
extends Object
implements Trapper<Object>, ApplicationTrapperAware, ViewTrapperAware, NumberAware


Constructor Summary
PropertyTrapper(ApplicationTrapper applicationTrapper, String targetName)
           
 
Method Summary
 ApplicationTrapper applicationTrapper()
           
 PropertyTrapper asByte()
           
 PropertyTrapper asCollection()
           
 PropertyTrapper asDouble()
           
 PropertyTrapper asFloat()
           
 PropertyTrapper asInteger()
           
 PropertyTrapper asLong()
           
 PropertyTrapper asNumber()
           
 PropertyTrapper asShort()
           
 Integer collectionSize()
           
 Object getTarget()
           
 Class<Object> getType()
           
 PropertyTrapper log(String message)
           
 PropertyTrapper property(String propertyName)
           
 PropertyTrapper requireByte(Byte number)
           
 PropertyTrapper requireDouble(Double number)
           
 PropertyTrapper requireFloat(Float number)
           
 PropertyTrapper requireInteger(Integer number)
           
 PropertyTrapper requireLong(Long number)
           
 PropertyTrapper requireNumber(Number number)
           
 PropertyTrapper requireShort(Short number)
           
 PropertyTrapper requireSize(Integer expected)
           
 void setTarget(Object target)
           
 ViewTrapper view()
           
 ViewTrapper view(String viewId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyTrapper

public PropertyTrapper(ApplicationTrapper applicationTrapper,
                       String targetName)
Parameters:
applicationTrapper -
componentName -
Method Detail

applicationTrapper

public ApplicationTrapper applicationTrapper()
Specified by:
applicationTrapper in interface ApplicationTrapperAware

asByte

public PropertyTrapper asByte()
Specified by:
asByte in interface NumberAware
Returns:

asCollection

public PropertyTrapper asCollection()
Returns:

asDouble

public PropertyTrapper asDouble()
Specified by:
asDouble in interface NumberAware
Returns:

asFloat

public PropertyTrapper asFloat()
Specified by:
asFloat in interface NumberAware
Returns:

asInteger

public PropertyTrapper asInteger()
Specified by:
asInteger in interface NumberAware
Returns:

asLong

public PropertyTrapper asLong()
Specified by:
asLong in interface NumberAware
Returns:

asNumber

public PropertyTrapper asNumber()
Specified by:
asNumber in interface NumberAware
Returns:

asShort

public PropertyTrapper asShort()
Specified by:
asShort in interface NumberAware
Returns:

collectionSize

public Integer collectionSize()
Returns:

getTarget

public Object getTarget()
Specified by:
getTarget in interface Trapper<Object>
Returns:

getType

public Class<Object> getType()
Specified by:
getType in interface Trapper<Object>
Returns:

log

public PropertyTrapper log(String message)
Specified by:
log in interface Trapper<Object>
Returns:

property

public PropertyTrapper property(String propertyName)
Parameters:
propertyName -
Returns:

requireByte

public PropertyTrapper requireByte(Byte number)
Specified by:
requireByte in interface NumberAware
Returns:

requireDouble

public PropertyTrapper requireDouble(Double number)
Specified by:
requireDouble in interface NumberAware
Returns:

requireFloat

public PropertyTrapper requireFloat(Float number)
Specified by:
requireFloat in interface NumberAware
Returns:

requireInteger

public PropertyTrapper requireInteger(Integer number)
Specified by:
requireInteger in interface NumberAware
Returns:

requireLong

public PropertyTrapper requireLong(Long number)
Specified by:
requireLong in interface NumberAware
Returns:

requireNumber

public PropertyTrapper requireNumber(Number number)
Specified by:
requireNumber in interface NumberAware
Returns:

requireShort

public PropertyTrapper requireShort(Short number)
Specified by:
requireShort in interface NumberAware
Returns:

requireSize

public PropertyTrapper requireSize(Integer expected)
Parameters:
expected -
Returns:

setTarget

public void setTarget(Object target)
Specified by:
setTarget in interface Trapper<Object>

view

public ViewTrapper view()
Specified by:
view in interface ViewTrapperAware
Returns:

view

public ViewTrapper view(String viewId)
Specified by:
view in interface ViewTrapperAware
Returns:


Copyright © 2010. All Rights Reserved.