app/src/androidTest/java/com/example/android/popularmoviesapp/data/TestUtilities.java
static void validateCurrentRecord(
            String errorMessage, Cursor valueCursor, ContentValues expectedValues) {

        Set<Map.Entry<String, Object>> valueSet = expectedValues.valueSet();
        for (Map.Entry<String, Object> entry : valueSet) {
            String columnName = entry.getKey();
            int idx = valueCursor.getColumnIndex(columnName);

            assertFalse("Column '" + columnName + "' not found. " + errorMessage, idx == -1);

            validate(errorMessage, valueCursor, entry, idx);
        }
    }
/**
     * Ensures all columns are found and have the correct values.
     * Note: copied from https://github.com/udacity/Sunshine-Version-2
     */
Ensures all columns are found and have the correct values.
Ensures all columns are found and have the correct values .
static void validateCurrentRecord(
            String errorMessage, Cursor valueCursor, ContentValues expectedValues) {
        Set<Map.Entry<String, Object>> valueSet = expectedValues.valueSet();
        for (Map.Entry<String, Object> entry : valueSet) {
            String columnName = entry.getKey();
            int idx = valueCursor.getColumnIndex(columnName);
            assertFalse("Column '" + columnName + "' not found. " + errorMessage, idx == -1);
            validate(errorMessage, valueCursor, entry, idx);
        }
    }
static void validateCurrentRecord ( String errorMessage , Cursor valueCursor , ContentValues expectedValues ) { Set < Map . Entry < String , Object > > valueSet = expectedValues . valueSet ( ) ; for ( Map . Entry < String , Object > entry : valueSet ) { String columnName = entry . getKey ( ) ; int idx = valueCursor . getColumnIndex ( columnName ) ; assertFalse ( "Column '" + columnName + "' not found. " + errorMessage , idx == - 1 ) ; validate ( errorMessage , valueCursor , entry , idx ) ; } }
Ensures all columns are found and have the correct values.
Ensures all columns are found and have the correct values .