org.sodatest.api.java
Class SodaEventForJava

java.lang.Object
  extended by org.sodatest.api.java.JavaParameterConverter
      extended by org.sodatest.api.java.SodaEventForJava
All Implemented Interfaces:
org.sodatest.api.SodaEvent

public abstract class SodaEventForJava
extends JavaParameterConverter
implements org.sodatest.api.SodaEvent

Abstract base class for Java-based SodaEvents that do not require reflection-based coercion and binding. The majority of Events will more easily be written by extending ReflectiveSodaEventForJava

See Also:
ReflectiveSodaEventForJava

Constructor Summary
SodaEventForJava()
           
 
Method Summary
 void apply(scala.collection.immutable.Map<String,String> parameters)
          Converts the parameters to a Java Map and passes them to executeEvent(java.util.Map) You can override JavaParameterConverter.convertParameters(scala.collection.immutable.Map) if you want to use a different method of conversion.
abstract  void executeEvent(Map<String,String> parameters)
          Applies this event to the System under test using the given parameters.
 
Methods inherited from class org.sodatest.api.java.JavaParameterConverter
convertParameters, list, None
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SodaEventForJava

public SodaEventForJava()
Method Detail

executeEvent

public abstract void executeEvent(Map<String,String> parameters)
                           throws org.sodatest.coercion.CoercionBindingException
Applies this event to the System under test using the given parameters.

Parameters:
parameters - A map of parameter names and values that should be used in applying the Event.
Throws:
org.sodatest.coercion.CoercionBindingException - if an error occurs while attempting to translate one of the string values in the parameter map into a value that can be used by the Event.
Throwable - if anything else goes wrong while executing the Event.

apply

public final void apply(scala.collection.immutable.Map<String,String> parameters)
                 throws org.sodatest.coercion.CoercionBindingException
Converts the parameters to a Java Map and passes them to executeEvent(java.util.Map) You can override JavaParameterConverter.convertParameters(scala.collection.immutable.Map) if you want to use a different method of conversion.

Specified by:
apply in interface org.sodatest.api.SodaEvent
Throws:
org.sodatest.coercion.CoercionBindingException


Copyright © 2010-2011 Belmont Technology Pty Ltd. All Rights Reserved.