public void TestYahooMasterGet()
        {
            var m    = new YahooMaster("Yahoo", "YahooOutput.xml");
            var stat = m.GetStat("2013:02:MANNPE01");

            Assert.AreEqual(19.0M, stat);
        }
        public void TestYahooMasterGetVick2013Week03()
        {
            var m    = new YahooMaster("Yahoo", "YahooOutput.xml");
            var stat = m.GetStat("2013:03:VICKMI01");

            Assert.AreEqual(17.0M, stat);
        }
        public void TestEspnScorerAccesstoYahooXml()
        {
            var m   = new YahooMaster("Yahoo", "YahooOutput.xml");
            var pts = m.GetStat("2012:04:AKERDA01");

            Assert.AreEqual(11, pts, "Akers got 11 pts in week 4 of 2012");
        }
Esempio n. 4
0
        public void TestRosterGridPerfomanceReport()
        {
            var master = new YahooMaster("Yahoo", "YahooOutput.xml");
            var cat    = Constants.K_RUNNINGBACK_CAT;

            RosterGrid.RosterGrid.GenericEspnPerformance(cat, master, Constants.K_LEAGUE_Rants_n_Raves, "RB");
        }
Esempio n. 5
0
        private static void GenerateYahooXml()
        {
            var m = new YahooMaster("Yahoo", "YahooOutput.xml");

            m.Calculate(Utility.CurrentSeason(), Utility.CurrentWeek());
            m.Dump2Xml();
        }
Esempio n. 6
0
        private static string WeeklyEspnPerformance(
            string catCode, int week, string leagueId, [System.Runtime.InteropServices.Optional] string sPos)
        {
            var pl = new PlayerLister {
                WeeksToGoBack = 1
            };
            var master      = new YahooMaster("Yahoo", "YahooOutput.xml");
            var currentWeek =
                new NFLWeek(Int32.Parse(Utility.CurrentSeason()), weekIn: week, loadGames: false);
            var gs = new EspnScorer(currentWeek)
            {
                Master = master
            };

            pl.SetScorer(gs);
            pl.SetFormat("weekly");
            pl.AllWeeks    = false;          //  just the regular saeason
            pl.Season      = currentWeek.Season;
            pl.RenderToCsv = false;
            pl.Week        = week;
            pl.Collect(catCode, sPos: sPos, fantasyLeague: leagueId);

            var targetFile = string.Format("{4}{3}//Performance//{2}-Yahoo {1} Performance upto Week {0}.htm",
                                           currentWeek.WeekNo, sPos, leagueId, pl.Season, Utility.OutputDirectory());

            pl.Render(targetFile);
            return(pl.FileOut);
        }
        public void TestYahooMasterCalculating()
        {
            var m = new YahooMaster("Yahoo", "YahooOutput.xml");

            m.Calculate("2013", "06");
            m.Dump2Xml();
            Assert.IsTrue(File.Exists(m.Filename));
        }
Esempio n. 8
0
        public void TestGenYahooAllPositionsCurrentWeek()
        {
            var m = new YahooMaster("Yahoo", "YahooOutput.xml");

            m.Calculate("2013", Utility.CurrentWeek());
            m.Dump2Xml();
            Assert.IsTrue(File.Exists(m.Filename));
            TestAllPositionsBeastModeCurrentWeek();
            TestAllPositionsYahooCurrentWeek();
            TestAllPositionsRantsCurrentWeek();
        }
        public void TestYahooMasterPersistence()
        {
            var m    = new YahooMaster("Yahoo", "YahooOutput.xml");
            var stat = new RosterLib.Models.YahooOutput
            {
                Season   = "2012",
                Week     = "01",
                PlayerId = "GRIFRO01",
                Opponent = "NO",
                Quantity = 30.0M
            };

            m.PutStat(stat);
            m.Dump2Xml();
            Assert.IsTrue(File.Exists(m.Filename), string.Format("{0} not found", m.Filename));
        }
Esempio n. 10
0
        public void TestYahooMasterConstructor()
        {
            var m = new YahooMaster("Yahoo", "YahooOutput.xml");

            Assert.IsNotNull(m);
        }