Exemplo n.º 1
0
        void TestFactory(StrategyFactoryType tp)
        {
            ScoresCalculator calc = new ScoresCalculator();

            IStrategyFactory factory = StrategyFactoryCreater.Instance().CreateFactory(tp);

            FakeStockHistory fsh = new FakeStockHistory();
            fsh.Init();
            calc.Calc(fsh, factory, new FakeIBonusProcessor());
        }
Exemplo n.º 2
0
        void TestFactory(StrategyFactoryType tp)
        {
            ScoresCalculator calc = new ScoresCalculator();

            IStrategyFactory factory = StrategyFactoryCreater.Instance().CreateFactory(tp);

            FakeStockHistory fsh = new FakeStockHistory();

            fsh.Init();
            calc.Calc(fsh, factory, new FakeIBonusProcessor());
        }
Exemplo n.º 3
0
        public void Go()
        {
            FakeStockHistory hist = new FakeStockHistory();
            hist.Init();

            LogMgr.Logger = new DummyLog();

            FinanceRunner runner = new FinanceRunner();
            runner.CurrentBonusProcessor = new FakeIBonusProcessor();
            IStrategyFactory factory = StrategyFactoryCreater.Instance().CreateFactory(StrategyFactoryType.Normal);
            runner.Go(hist, factory);

            StrategyResults results = runner.Results;
            Assert.IsTrue(results.AllStrategyNames.Count > 0);

            LogMgr.Logger.Close();
        }
Exemplo n.º 4
0
        public void Go()
        {
            FakeStockHistory hist = new FakeStockHistory();

            hist.Init();

            LogMgr.Logger = new DummyLog();

            FinanceRunner runner = new FinanceRunner();

            runner.CurrentBonusProcessor = new FakeIBonusProcessor();
            IStrategyFactory factory = StrategyFactoryCreater.Instance().CreateFactory(StrategyFactoryType.Normal);

            runner.Go(hist, factory);

            StrategyResults results = runner.Results;

            Assert.IsTrue(results.AllStrategyNames.Count > 0);

            LogMgr.Logger.Close();
        }