TestUtilities.java 文件源码

java
阅读 48 收藏 0 点赞 0 评论 0

项目:android-dev-challenge 作者:
/**
 * Used as a convenience method to return a singleton instance of ContentValues to populate
 * our database or insert using our ContentProvider.
 *
 * @return ContentValues that can be inserted into our ContentProvider or weather.db
 */
static ContentValues createTestWeatherContentValues() {

    ContentValues testWeatherValues = new ContentValues();

    testWeatherValues.put(COLUMN_DATE, DATE_NORMALIZED);
    testWeatherValues.put(COLUMN_DEGREES, 1.1);
    testWeatherValues.put(COLUMN_HUMIDITY, 1.2);
    testWeatherValues.put(COLUMN_PRESSURE, 1.3);
    testWeatherValues.put(COLUMN_MAX_TEMP, 75);
    testWeatherValues.put(COLUMN_MIN_TEMP, 65);
    testWeatherValues.put(COLUMN_WIND_SPEED, 5.5);
    testWeatherValues.put(COLUMN_WEATHER_ID, 321);

    return testWeatherValues;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号