android.test.mock
Class MockCursor

java.lang.Object
  extended by android.test.mock.MockCursor
All Implemented Interfaces:
android.database.Cursor

public class MockCursor
extends java.lang.Object
implements android.database.Cursor


Constructor Summary
MockCursor()
           
 
Method Summary
 void abortUpdates()
           
 void close()
           
 boolean commitUpdates()
           
 boolean commitUpdates(java.util.Map<? extends java.lang.Long,? extends java.util.Map<java.lang.String,java.lang.Object>> values)
           
 void copyStringToBuffer(int columnIndex, android.database.CharArrayBuffer buffer)
           
 void deactivate()
           
 boolean deleteRow()
           
 byte[] getBlob(int columnIndex)
           
 int getColumnCount()
           
 int getColumnIndex(java.lang.String columnName)
           
 int getColumnIndexOrThrow(java.lang.String columnName)
           
 java.lang.String getColumnName(int columnIndex)
           
 java.lang.String[] getColumnNames()
           
 int getCount()
           
 double getDouble(int columnIndex)
           
 android.os.Bundle getExtras()
           
 float getFloat(int columnIndex)
           
 int getInt(int columnIndex)
           
 long getLong(int columnIndex)
           
 int getPosition()
           
 short getShort(int columnIndex)
           
 java.lang.String getString(int columnIndex)
           
 boolean getWantsAllOnMoveCalls()
           
 boolean hasUpdates()
           
 boolean isAfterLast()
           
 boolean isBeforeFirst()
           
 boolean isClosed()
           
 boolean isFirst()
           
 boolean isLast()
           
 boolean isNull(int columnIndex)
           
 boolean move(int offset)
           
 boolean moveToFirst()
           
 boolean moveToLast()
           
 boolean moveToNext()
           
 boolean moveToPosition(int position)
           
 boolean moveToPrevious()
           
 void registerContentObserver(android.database.ContentObserver observer)
           
 void registerDataSetObserver(android.database.DataSetObserver observer)
           
 boolean requery()
           
 android.os.Bundle respond(android.os.Bundle extras)
           
 void setNotificationUri(android.content.ContentResolver cr, android.net.Uri uri)
           
 boolean supportsUpdates()
           
 void unregisterContentObserver(android.database.ContentObserver observer)
           
 void unregisterDataSetObserver(android.database.DataSetObserver observer)
           
 boolean updateBlob(int columnIndex, byte[] value)
           
 boolean updateDouble(int columnIndex, double value)
           
 boolean updateFloat(int columnIndex, float value)
           
 boolean updateInt(int columnIndex, int value)
           
 boolean updateLong(int columnIndex, long value)
           
 boolean updateShort(int columnIndex, short value)
           
 boolean updateString(int columnIndex, java.lang.String value)
           
 boolean updateToNull(int columnIndex)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MockCursor

public MockCursor()
Method Detail

getColumnCount

public int getColumnCount()
Specified by:
getColumnCount in interface android.database.Cursor

getColumnIndex

public int getColumnIndex(java.lang.String columnName)
Specified by:
getColumnIndex in interface android.database.Cursor

getColumnIndexOrThrow

public int getColumnIndexOrThrow(java.lang.String columnName)
Specified by:
getColumnIndexOrThrow in interface android.database.Cursor

getColumnName

public java.lang.String getColumnName(int columnIndex)
Specified by:
getColumnName in interface android.database.Cursor

getColumnNames

public java.lang.String[] getColumnNames()
Specified by:
getColumnNames in interface android.database.Cursor

getCount

public int getCount()
Specified by:
getCount in interface android.database.Cursor

isNull

public boolean isNull(int columnIndex)
Specified by:
isNull in interface android.database.Cursor

getInt

public int getInt(int columnIndex)
Specified by:
getInt in interface android.database.Cursor

getLong

public long getLong(int columnIndex)
Specified by:
getLong in interface android.database.Cursor

getShort

public short getShort(int columnIndex)
Specified by:
getShort in interface android.database.Cursor

getFloat

public float getFloat(int columnIndex)
Specified by:
getFloat in interface android.database.Cursor

getDouble

public double getDouble(int columnIndex)
Specified by:
getDouble in interface android.database.Cursor

getBlob

public byte[] getBlob(int columnIndex)
Specified by:
getBlob in interface android.database.Cursor

getString

public java.lang.String getString(int columnIndex)
Specified by:
getString in interface android.database.Cursor

getExtras

public android.os.Bundle getExtras()
Specified by:
getExtras in interface android.database.Cursor

getPosition

public int getPosition()
Specified by:
getPosition in interface android.database.Cursor

isAfterLast

public boolean isAfterLast()
Specified by:
isAfterLast in interface android.database.Cursor

isBeforeFirst

public boolean isBeforeFirst()
Specified by:
isBeforeFirst in interface android.database.Cursor

isFirst

public boolean isFirst()
Specified by:
isFirst in interface android.database.Cursor

isLast

public boolean isLast()
Specified by:
isLast in interface android.database.Cursor

move

public boolean move(int offset)
Specified by:
move in interface android.database.Cursor

moveToFirst

public boolean moveToFirst()
Specified by:
moveToFirst in interface android.database.Cursor

moveToLast

public boolean moveToLast()
Specified by:
moveToLast in interface android.database.Cursor

moveToNext

public boolean moveToNext()
Specified by:
moveToNext in interface android.database.Cursor

moveToPrevious

public boolean moveToPrevious()
Specified by:
moveToPrevious in interface android.database.Cursor

moveToPosition

public boolean moveToPosition(int position)
Specified by:
moveToPosition in interface android.database.Cursor

copyStringToBuffer

public void copyStringToBuffer(int columnIndex,
                               android.database.CharArrayBuffer buffer)
Specified by:
copyStringToBuffer in interface android.database.Cursor

deactivate

public void deactivate()
Specified by:
deactivate in interface android.database.Cursor

close

public void close()
Specified by:
close in interface android.database.Cursor

isClosed

public boolean isClosed()
Specified by:
isClosed in interface android.database.Cursor

requery

public boolean requery()
Specified by:
requery in interface android.database.Cursor

registerContentObserver

public void registerContentObserver(android.database.ContentObserver observer)
Specified by:
registerContentObserver in interface android.database.Cursor

registerDataSetObserver

public void registerDataSetObserver(android.database.DataSetObserver observer)
Specified by:
registerDataSetObserver in interface android.database.Cursor

respond

public android.os.Bundle respond(android.os.Bundle extras)
Specified by:
respond in interface android.database.Cursor

getWantsAllOnMoveCalls

public boolean getWantsAllOnMoveCalls()
Specified by:
getWantsAllOnMoveCalls in interface android.database.Cursor

commitUpdates

public boolean commitUpdates()

commitUpdates

public boolean commitUpdates(java.util.Map<? extends java.lang.Long,? extends java.util.Map<java.lang.String,java.lang.Object>> values)

hasUpdates

public boolean hasUpdates()

setNotificationUri

public void setNotificationUri(android.content.ContentResolver cr,
                               android.net.Uri uri)
Specified by:
setNotificationUri in interface android.database.Cursor

supportsUpdates

public boolean supportsUpdates()

deleteRow

public boolean deleteRow()

unregisterContentObserver

public void unregisterContentObserver(android.database.ContentObserver observer)
Specified by:
unregisterContentObserver in interface android.database.Cursor

unregisterDataSetObserver

public void unregisterDataSetObserver(android.database.DataSetObserver observer)
Specified by:
unregisterDataSetObserver in interface android.database.Cursor

updateBlob

public boolean updateBlob(int columnIndex,
                          byte[] value)

updateDouble

public boolean updateDouble(int columnIndex,
                            double value)

updateFloat

public boolean updateFloat(int columnIndex,
                           float value)

updateInt

public boolean updateInt(int columnIndex,
                         int value)

updateLong

public boolean updateLong(int columnIndex,
                          long value)

updateShort

public boolean updateShort(int columnIndex,
                           short value)

updateString

public boolean updateString(int columnIndex,
                            java.lang.String value)

updateToNull

public boolean updateToNull(int columnIndex)

abortUpdates

public void abortUpdates()


Copyright © 2008-2010. All Rights Reserved.