public void TearDown()
 {
     myContext      = null;
     myProvider     = null;
     myCurrentPrice = null;
     myRhsSeries    = null;
 }
        public void SetUp()
        {
            myContext = new Mock <IFigureProviderContext> {
                DefaultValue = DefaultValue.Mock
            };
            myContext.Setup(x => x.Stock).Returns(() => new Stock());
            myContext.Setup(x => x.Data).Returns(() =>
            {
                var data = new List <IFigureSeries>();
                if (myCurrentPrice != null)
                {
                    data.Add(new FigureSeries(typeof(Price), myCurrentPrice));
                }
                return(data);
            });
            myContext.Setup(x => x.GetSeries(RhsSeriesName)).Returns(() => myRhsSeries);

            myProvider = new GenericPriceRatioProvider("dummy", RhsSeriesName, (lhs, rhs) => lhs + rhs);
        }