I'm writing tests to exercise my database using ProviderTestCase2. Within my application, as part of the onCreate and onUpdate methods in my SQLiteOpenHelper subclass, several SQL statements are executed. These statements are stored in my strings.xml resources file.
The issue is that I can't call getResources on the ProviderTestCase2's mock context because its internal RenamingDelegatingContext only supports calls to database and file related context methods, everything else throws an UnsupportedOperationException. I have solved this by implementing my own RenamingDelegatingContext that also supports getResources() but given that this is not supported by default, I was wondering if I have done something that is considered bad form by storing SQL statements in strings.xml instead of hard coding them in my SQLiteOpenHelper subclass. Any comments? -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

