Example #1
0
        public string Execute(string cmdContent)
        {
            //IWeather weather = new WebXmlWeather();
            IWeather weather = new GoogleWeather();

            return(weather.Search(cmdContent));
        }
Example #2
0
        public void GoogleTest()
        {
            GoogleWeather gw     = new GoogleWeather();
            string        expect = gw.Search("合肥");

            Console.WriteLine(expect);

            expect = gw.Search("南京");

            Console.WriteLine(expect);

            expect = gw.Search("上海");

            Console.WriteLine(expect);

            Assert.IsNotNullOrEmpty(expect);
        }