org.callbackparams.combine
Interface CombineStrategy

All Known Implementing Classes:
AbstractCombineStrategy, CombineAllPossible2Combinations, CombineCompletely

public interface CombineStrategy

This is the API-interface that must be implemented by any combine-strategy class.

The combine-strategy class should also have a default constructor or it cannot be instanciated by the framework's built-in funtionality, which is available through the class AnnotationAwareCallbackRecordsFactory, which assumes the annotation @CombineConfig has been used to specify the combine-strategy class.

Instead of having the strategy-classes explicitly implement this interface strategy-developers are encouraged to subclass AbstractCombineStrategy. This abstract class offers some common functionality and can also keep your test-classes up-to-date with any future modifications to this interface.

Author:
Henrik Kaipe
See Also:
AbstractCombineStrategy

Method Summary
 Collection combine(ValuesCollection vc)
          Implementations of this method will create a collection of callback- records based on the configuration of this CombineStrategy instance.
 void setMaxCount(int maxCount)
          Specifies the maximum number of combinations that the method combine(ValuesCollection) is allowed to return.
 void setRandomSeed(long randomSeed)
          Some CombineStrategy implementations does to some extent pick callback-record parameters randomly.
 

Method Detail

setMaxCount

void setMaxCount(int maxCount)
Specifies the maximum number of combinations that the method combine(ValuesCollection) is allowed to return. The default value is implementation dependent.


setRandomSeed

void setRandomSeed(long randomSeed)
Some CombineStrategy implementations does to some extent pick callback-record parameters randomly. With this setter it is possible to specify which random seed to use and therewith make sure the exact same set of callback-records is used on each test-run.


combine

Collection combine(ValuesCollection vc)
Implementations of this method will create a collection of callback- records based on the configuration of this CombineStrategy instance. The callback-parameters used at a certain index in the created callback-records are picked from the array at the corresponding index in the argument ValuesCollection instance.



Copyright © 2010-2013 Henrik Kaipe. All Rights Reserved.