public void AddResult() { StrategyResults res = new StrategyResults(); res.AddResult("Test", new StockValues()); ICollection <string> names = res.AllStrategyNames; Assert.AreEqual(names.Count, 1); }
public void GetResult() { StrategyResults res = new StrategyResults(); res.AddResult("Test", new StockValues()); IStockValues val = res.GetResult("Test"); Assert.IsNotNull(val); val = res.GetResult("NOTEXIST"); Assert.IsNull(val); }
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(); }