com.readystatesoftware.sqliteasset.SQLiteAssetHelper$SQLiteAssetException

Stack Overflow | Script Kitty | 5 months ago
  1. 0

    Mockito mock a context.getApplicationInfo in Android Unit Testing

    Stack Overflow | 5 months ago | Script Kitty
    com.readystatesoftware.sqliteasset.SQLiteAssetHelper$SQLiteAssetException

    Root Cause Analysis

    1. com.readystatesoftware.sqliteasset.SQLiteAssetHelper$SQLiteAssetException

      No message provided

      at java.io.FileOutputStream.open0()
    2. Java RT
      FileOutputStream.<init>
      1. java.io.FileOutputStream.open0(Native Method)
      2. java.io.FileOutputStream.open(FileOutputStream.java:270)
      3. java.io.FileOutputStream.<init>(FileOutputStream.java:213)
      4. java.io.FileOutputStream.<init>(FileOutputStream.java:101)
      4 frames
    3. com.readystatesoftware.sqliteasset
      SQLiteAssetHelper.getWritableDatabase
      1. com.readystatesoftware.sqliteasset.SQLiteAssetHelper.copyDatabaseFromAssets(SQLiteAssetHelper.java:455)
      2. com.readystatesoftware.sqliteasset.SQLiteAssetHelper.createOrOpenDatabase(SQLiteAssetHelper.java:400)
      3. com.readystatesoftware.sqliteasset.SQLiteAssetHelper.getWritableDatabase(SQLiteAssetHelper.java:176)
      3 frames
    4. com.cinnamint.cotidiano
      MainUnitTest.dateValidator_CorrectNumberOfWordsGrab_ReturnWords
      1. com.cinnamint.cotidiano.MainUnitTest.dateValidator_CorrectNumberOfWordsGrab_ReturnWords(MainUnitTest.java:88)
      1 frame
    5. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:498)
      4 frames
    6. JUnit
      ParentRunner.run
      1. org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
      2. org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      3. org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
      4. org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
      5. org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
      6. org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
      7. org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
      8. org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
      9. org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
      10. org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
      11. org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
      12. org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
      13. org.junit.runners.ParentRunner.run(ParentRunner.java:363)
      13 frames
    7. Mockito
      MockitoJUnitRunner.run
      1. org.mockito.internal.runners.JUnit45AndHigherRunnerImpl.run(JUnit45AndHigherRunnerImpl.java:37)
      2. org.mockito.runners.MockitoJUnitRunner.run(MockitoJUnitRunner.java:62)
      2 frames
    8. JUnit
      JUnitCore.run
      1. org.junit.runner.JUnitCore.run(JUnitCore.java:137)
      1 frame
    9. IntelliJ junit4 module
      JUnit4IdeaTestRunner.startRunnerWithArgs
      1. com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
      1 frame
    10. IDEA
      JUnitStarter.main
      1. com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234)
      2. com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74)
      2 frames
    11. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:498)
      4 frames
    12. IDEA
      AppMain.main
      1. com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
      1 frame