eu.lindenbaum.maven.erlang
Class TestScript

java.lang.Object
  extended by eu.lindenbaum.maven.erlang.TestScript
All Implemented Interfaces:
Script<TestResult>

public final class TestScript
extends Object

A Script executing a list of (eunit) tests.

Author:
Tobias Schlager , Olle Törnström

Field Summary
protected  String script
           
 
Fields inherited from interface eu.lindenbaum.maven.erlang.Script
NL
 
Constructor Summary
TestScript(List<File> tests, File surefireDir, String suiteName)
          Creates a Script executing a list of eunit tests.
 
Method Summary
 String get()
          Returns an evaluateable String containing the erlang script of the implementing class.
 TestResult handle(com.ericsson.otp.erlang.OtpErlangObject result)
          Converts the result of the Script execution into an object capable of logging the test output as well as returning whether the unit test execution succeeded.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

script

protected final String script
Constructor Detail

TestScript

public TestScript(List<File> tests,
                  File surefireDir,
                  String suiteName)
           throws org.apache.maven.plugin.MojoExecutionException
Creates a Script executing a list of eunit tests.

Parameters:
tests - to run
surefireDir - to output surefire compatible reports into
suiteName - the name of the test suite (for surefire)
Throws:
org.apache.maven.plugin.MojoExecutionException
Method Detail

get

public String get()
Description copied from interface: Script
Returns an evaluateable String containing the erlang script of the implementing class.

Returns:
An erlang script that can be evaluated.

handle

public TestResult handle(com.ericsson.otp.erlang.OtpErlangObject result)
Converts the result of the Script execution into an object capable of logging the test output as well as returning whether the unit test execution succeeded.

Parameters:
result - The return term of the Script execution.
Returns:
An object capable of delivering the results transparently.


Copyright © 2011 Lindenbaum GmbH. All Rights Reserved.