/// <summary> /// Creates a test instance actions object initially configured with empty action chains /// that do nothing. /// </summary> public PatternTestInstanceActions() { beforeTestInstanceChain = new ActionChain <PatternTestInstanceState>(); initializeTestInstanceChain = new ActionChain <PatternTestInstanceState>(); setUpTestInstanceChain = new ActionChain <PatternTestInstanceState>(); executeTestInstanceChain = new ActionChain <PatternTestInstanceState>(); tearDownTestInstanceChain = new ActionChain <PatternTestInstanceState>(); disposeTestInstanceChain = new ActionChain <PatternTestInstanceState>(); afterTestInstanceChain = new ActionChain <PatternTestInstanceState>(); decorateChildTestChain = new ActionChain <PatternTestInstanceState, PatternTestActions>(); runTestInstanceBodyChain = new FuncChain <PatternTestInstanceState, TestOutcome>(DefaultRunTestInstanceBodyFunc); }
/// <summary> /// Creates a test instance actions object initially configured with empty action chains /// that do nothing. /// </summary> public PatternTestInstanceActions() { beforeTestInstanceChain = new ActionChain<PatternTestInstanceState>(); initializeTestInstanceChain = new ActionChain<PatternTestInstanceState>(); setUpTestInstanceChain = new ActionChain<PatternTestInstanceState>(); executeTestInstanceChain = new ActionChain<PatternTestInstanceState>(); tearDownTestInstanceChain = new ActionChain<PatternTestInstanceState>(); disposeTestInstanceChain = new ActionChain<PatternTestInstanceState>(); afterTestInstanceChain = new ActionChain<PatternTestInstanceState>(); decorateChildTestChain = new ActionChain<PatternTestInstanceState, PatternTestActions>(); runTestInstanceBodyChain = new FuncChain<PatternTestInstanceState, TestOutcome>(DefaultRunTestInstanceBodyFunc); }
public void SetUp() { chain = new FuncChain <string, int>(LengthOf); }
public void Ordering() { var chain = FuncChain <int> .Wrap(2).Fmap(x => x + 10).Fmap(x => x * 10); Assert.AreEqual((2 + 10) * 10, chain.Run()); }
public void SetUp() { chain = new FuncChain<string, int>(LengthOf); }
static void Main(string[] args) { var func = new FuncChain <int, int, double>(new Double(), new Half()); Console.WriteLine(func.Call(2)); }