コード例 #1
0
        static void Main(string[] args)
        {
            ParseMain parseMain = new ParseMain();
            string    html      = parseMain.GetPage(Constants.mainUrl);

            List <PlayerModel> players = parseMain.GetPlayers(html);

            CSVService cSVService = new CSVService();

            cSVService.CreateCSV(players);

            Console.WriteLine("done, path to file: " + Constants.pathToCSV);
        }
コード例 #2
0
        public void CheckWriteCSVWithSuccess()
        {
            bool        output      = true;
            ICSVService _csvService = new CSVService();

            string path = FileHelper.CreateFile("csv");

            _csvService.CreateCSV(path);

            if (!File.Exists(path))
            {
                output = false;
            }

            Assert.True(output);
        }