Package org.robolectric.shadows
Class ShadowDropBoxManager
java.lang.Object
org.robolectric.shadows.ShadowDropBoxManager
Fake dropbox manager that starts with no entries.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidAdds entry to the DropboxManager with the flag indicating data is text.protected voidAdds a text entry to dropbox with the current timestamp using UTF-8 encoding.protected DropBoxManager.EntrygetNextEntry(String tag, long millis) static voidreset()Clears all entries.
- 
Constructor Details- 
ShadowDropBoxManagerpublic ShadowDropBoxManager()
 
- 
- 
Method Details- 
addDataAdds entry to the DropboxManager with the flag indicating data is text.The existing DropBoxManager.addData(java.lang.String, byte[], int)andDropBoxManager.addFile(java.lang.String, java.io.File, int)methods in DropBoxManager are not shadowed (and do not work), butDropBoxManager.addText(java.lang.String, java.lang.String)is. This method is a convenience for quickly adding multiple historical entries. The entries can be added in any order since this shadow will sort the entries by the specified timestamp.The flag will be set to DropBoxManager.IS_TEXTso thatDropBoxManager.Entry.getText(int)can be used.- Parameters:
- tag- can be any arbitrary string
- wallTimestamp- a unique timestamp for the entry, relative to- System.currentTimeMillis()
- data- must not be null
 
- 
addTextAdds a text entry to dropbox with the current timestamp using UTF-8 encoding.If adding multiple entries, it is required to ensure they have unique timestamps by bumping the wall-clock time, using SystemClockor similar.
- 
resetClears all entries.
- 
getNextEntry
 
-