Esempio n. 1
0
        static void Evaluate(Tree <Cell> rowTree, object systemUnderTest)
        {
            var interpreter = new DefaultFlowInterpreter(systemUnderTest);
            var row         = new FlowRow(rowTree);
            var processor   = Builder.CellProcessor();

            processor.AddOperator(new TestInvokeSpecialAction(), 2);
            row.Evaluate(processor, interpreter);
        }
Esempio n. 2
0
        public void CheckDrawDown()
        {
            var data  = new List <BalancesRow>();
            var flows = new FlowRow[] { };

            for (var i = 0; i < 1000; i++)
            {
                data.Add(new BalancesRow()
                {
                    Balance = i % 2 == 0 ? i : -i, DateTimeStamp = new DateTime(i)
                });
            }
            var info = new GeneralInvestingInfo(data, flows);

            Assert.AreEqual(info.DrawDown, 1997);
        }