Пример #1
0
        public void GetDetailTest()
        {
            GetGanJiJobs target = new GetGanJiJobs(); // TODO: 初始化为适当的值
            string url = "http://sh.ganji.com/jzcuxiaoyuan/10070810_1244906.htm"; // TODO: 初始化为适当的值
            NodeList expected = null; // TODO: 初始化为适当的值
            Job actual;
            actual = target.GetDetail(url);

            Console.WriteLine(actual.description);
            Console.WriteLine(actual.company);
        }
Пример #2
0
        public void GetListUrlTest()
        {
            GetGanJiJobs target = new GetGanJiJobs(); // TODO: 初始化为适当的值
            string url = "http://sh.ganji.com/jzcuxiaoyuan/"; // TODO: 初始化为适当的值

            NodeList actual;
            actual = target.GetListUrl(url);
            if (actual == null)
            {
                return;
            }

            for (int i=0;i<actual.Count;i++)
            {
                ATag a = actual[i] as ATag;
                if (a.Link.IndexOf("#") <= 0)
                {
                    Console.WriteLine(a.Link);
                }
            }

            Console.WriteLine("Count:{0}", actual.Count);
        }