示例#1
0
        public void WhenCalc_MpgIsCalled()
        {
            FuelEfficiency f = new FuelEfficiency();

            _scenarioContext.Add("mpg", f.calc_mpg(
                                     _scenarioContext.Get <float>("miles"),
                                     _scenarioContext.Get <float>("gallons")
                                     ));
        }
示例#2
0
        public void WhenCalc_MpgIsCalled()
        {
            FuelEfficiency f = new FuelEfficiency();

            //int m = _scenarioContext.Get<int>("miles");
            //int g = _scenarioContext.Get<int>("gallons");
            //int answer = f.calc_mpg(m, g);
            //_scenarioContext.Add("mpg", answer);

            _scenarioContext.Add("mpg",
                                 f.calc_mpg(_scenarioContext.Get <double>("miles"),
                                            _scenarioContext.Get <double>("gallons")));
        }