projects
/
Sunshine.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Done with bulk imports
[Sunshine.git]
/
app
/
src
/
androidTest
/
java
/
uk
/
me
/
njae
/
sunshine
/
TestDb.java
diff --git
a/app/src/androidTest/java/uk/me/njae/sunshine/TestDb.java
b/app/src/androidTest/java/uk/me/njae/sunshine/TestDb.java
index 73353e84bf85be93f80f5ae97b597e70ae3a87ff..86663d3122a4b00bb6c1989a28b9043c0261bf03 100644
(file)
--- a/
app/src/androidTest/java/uk/me/njae/sunshine/TestDb.java
+++ b/
app/src/androidTest/java/uk/me/njae/sunshine/TestDb.java
@@
-17,6
+17,9
@@
public class TestDb extends AndroidTestCase {
public static final String LOG_TAG = TestDb.class.getSimpleName();
public static final String LOG_TAG = TestDb.class.getSimpleName();
+ static final String TEST_LOCATION = "99705";
+ static final String TEST_DATE = "20141205";
+
public void testCreateDb() throws Throwable {
mContext.deleteDatabase(WeatherDbHelper.DATABASE_NAME);
SQLiteDatabase db = new WeatherDbHelper(
public void testCreateDb() throws Throwable {
mContext.deleteDatabase(WeatherDbHelper.DATABASE_NAME);
SQLiteDatabase db = new WeatherDbHelper(
@@
-27,12
+30,6
@@
public class TestDb extends AndroidTestCase {
public void testInsertReadDb() {
public void testInsertReadDb() {
- // Test data we're going to insert into the DB to see if it works.
- String testLocationSetting = "99705";
- String testCityName = "North Pole";
- double testLatitude = 64.7488;
- double testLongitude = -147.353;
-
// If there's an error in those massive SQL table creation Strings,
// errors will be thrown here when you try to get a writable database.
WeatherDbHelper dbHelper = new WeatherDbHelper(mContext);
// If there's an error in those massive SQL table creation Strings,
// errors will be thrown here when you try to get a writable database.
WeatherDbHelper dbHelper = new WeatherDbHelper(mContext);
@@
-62,7
+59,7
@@
public class TestDb extends AndroidTestCase {
null // sort order
);
null // sort order
);
-
validateCursor(cursor, locationTestValues);
+ validateCursor(cursor, locationTestValues);
// Fantastic. Now that we have a location, add some weather!
// Fantastic. Now that we have a location, add some weather!