Example #1
0
 /// <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);
 }
Example #3
0
 public void SetUp()
 {
     chain = new FuncChain <string, int>(LengthOf);
 }
Example #4
0
        public void Ordering()
        {
            var chain = FuncChain <int> .Wrap(2).Fmap(x => x + 10).Fmap(x => x * 10);

            Assert.AreEqual((2 + 10) * 10, chain.Run());
        }
Example #5
0
 public void SetUp()
 {
     chain = new FuncChain<string, int>(LengthOf);
 }
Example #6
0
        static void Main(string[] args)
        {
            var func = new FuncChain <int, int, double>(new Double(), new Half());

            Console.WriteLine(func.Call(2));
        }