org.eclipse.emf.emfstore.fuzzy.emf.junit
Interface ESFuzzyDataProvider<T>

Type Parameters:
T - Type to specify the values created by this data provider.
All Known Subinterfaces:
ESFuzzyEMFDataProvider
All Known Implementing Classes:
ESEMFDataProvider, ESXMIResourceDataProvider

public interface ESFuzzyDataProvider<T>

A Data Provider for the JUnit Runner: ESFuzzyRunner.

An implementation of it must have a zero-parameter constructor.

Since:
2.0
Author:
Julian Sommerfeldt

Method Summary
 T get(int count)
          Creates and returns the data for the next run.

Note that it is strongly recommended to instantiate the data in this method for every call and not in the instantiation of the class, e.g.
 List<org.junit.runner.notification.RunListener> getListener()
           
 ESModelMutatorConfiguration getModelMutatorConfiguration()
          Returns the ESModelMutatorConfiguration used by the data provider.
 List<ESFuzzyTest> getTestsToRun()
           
 ESFuzzyUtil getUtil()
           
 void init()
          This method is called after the ESFuzzyDataProvider was created and everything was set BEFORE the first run.
Should be used to to create internal stuff depending on e.g.
 void setMutator(ESAbstractModelMutator modelMutator)
          Sets the mutator to be used in order to generate and mutate data.
 void setOptions(Map<String,Object> options)
          Sets the options for the ESFuzzyDataProvider.
 void setTestClass(org.junit.runners.model.TestClass testClass)
           
 int size()
           
 

Method Detail

get

T get(int count)
Creates and returns the data for the next run.

Note that it is strongly recommended to instantiate the data in this method for every call and not in the instantiation of the class, e.g. the init method, to avoid overloading the memory.

Parameters:
count - The count of the testcase.
Returns:
The data for the next run of the test class.

init

void init()
This method is called after the ESFuzzyDataProvider was created and everything was set BEFORE the first run.
Should be used to to create internal stuff depending on e.g. the TestClass.


size

int size()
Returns:
The total size(count) of the repetition of the tests.

setTestClass

void setTestClass(org.junit.runners.model.TestClass testClass)
Parameters:
testClass - The TestClass of the calling ESFuzzyRunner.

getListener

List<org.junit.runner.notification.RunListener> getListener()
Returns:
A list of listeners to add to the runner, e.g. to get information about errors. null permitted.

getTestsToRun

List<ESFuzzyTest> getTestsToRun()
Returns:
A list of ESFuzzyTests to specify, which tests the ESFuzzyRunner should run. null means run all tests.

getUtil

ESFuzzyUtil getUtil()
Returns:
The ESFuzzyUtil for this ESFuzzyDataProvider. null permitted.

setOptions

void setOptions(Map<String,Object> options)
Sets the options for the ESFuzzyDataProvider. May be null.

Parameters:
options - The options for the ESFuzzyDataProvider. Can be null.

setMutator

void setMutator(ESAbstractModelMutator modelMutator)
Sets the mutator to be used in order to generate and mutate data.

Parameters:
modelMutator - the ESAbstractModelMutator to be used

getModelMutatorConfiguration

ESModelMutatorConfiguration getModelMutatorConfiguration()
Returns the ESModelMutatorConfiguration used by the data provider.

Returns:
the ESModelMutatorConfiguration used by the data provider


Copyright © 2015. All Rights Reserved.