Android Open Source - WeatherBar Weather Test






From Project

Back to project page WeatherBar.

License

The source code is released under:

MIT License

If you think the Android project WeatherBar listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.cjbarker.wb.ws;
/*  w  ww  . j  av  a 2s.c  om*/
import com.cjbarker.wb.ws.Weather.Forecast;
import com.cjbarker.wb.ws.Weather.Location;

import junit.framework.TestCase;

public class WeatherTest extends TestCase {
  
  private static final Location LOC_AUSTIN = new Location("Austin", "TX");
  
  private Weather weather;
  
  @Override
    protected void setUp() throws Exception {
        super.setUp();
        this.weather = new OpenWeather();
    }
    
    public void testGetToday() {
      Forecast fc = weather.getToday(LOC_AUSTIN);
      assertNotNull(fc);
      assertNotNull(fc.cloudDescp);
      assertNotNull(fc.location);
      assertNotNull(fc.sun);
      assertNotNull(fc.temperature);
      assertNotNull(fc.wind);
      assertTrue(fc.toString() != null && !fc.toString().trim().equals(""));
    }
}




Java Source Code List

com.cjbarker.wb.Main.java
com.cjbarker.wb.Notifier.java
com.cjbarker.wb.Prefs.java
com.cjbarker.wb.Util.java
com.cjbarker.wb.receiver.BatteryLevel.java
com.cjbarker.wb.receiver.Connection.java
com.cjbarker.wb.receiver.Screen.java
com.cjbarker.wb.ws.ClientRequestTest.java
com.cjbarker.wb.ws.ClientRequest.java
com.cjbarker.wb.ws.ClientResponse.java
com.cjbarker.wb.ws.OpenWeatherTest.java
com.cjbarker.wb.ws.OpenWeather.java
com.cjbarker.wb.ws.WeatherTest.java
com.cjbarker.wb.ws.Weather.java