@@ -78,8 +78,8 @@ public void test() {
7878 CoreWrapper .CoreOptions coreOptions = new CoreWrapper .CoreOptions ();
7979 coreOptions .inputPath = m_testFile .getAbsolutePath ();
8080 coreOptions .outputPath = outputPath .getPath ();
81- coreOptions .cachePath = cachePath .getPath ();
8281 coreOptions .editable = true ;
82+ coreOptions .cachePath = cachePath .getPath ();
8383
8484 CoreWrapper .CoreResult coreResult = CoreWrapper .parse (coreOptions );
8585 Assert .assertEquals (0 , coreResult .errorCode );
@@ -97,11 +97,13 @@ public void test() {
9797 public void testPasswordProtectedDocumentWithoutPassword () {
9898 File cacheDir = InstrumentationRegistry .getInstrumentation ().getTargetContext ().getCacheDir ();
9999 File outputDir = new File (cacheDir , "output_password_test" );
100+ File cachePath = new File (cacheDir , "core_cache" );
100101
101102 CoreWrapper .CoreOptions coreOptions = new CoreWrapper .CoreOptions ();
102103 coreOptions .inputPath = m_passwordTestFile .getAbsolutePath ();
103104 coreOptions .outputPath = outputDir .getPath ();
104105 coreOptions .editable = false ;
106+ coreOptions .cachePath = cachePath .getPath ();
105107
106108 CoreWrapper .CoreResult coreResult = CoreWrapper .parse (coreOptions );
107109 Assert .assertEquals (-2 , coreResult .errorCode );
@@ -111,12 +113,14 @@ public void testPasswordProtectedDocumentWithoutPassword() {
111113 public void testPasswordProtectedDocumentWithWrongPassword () {
112114 File cacheDir = InstrumentationRegistry .getInstrumentation ().getTargetContext ().getCacheDir ();
113115 File outputDir = new File (cacheDir , "output_password_test" );
116+ File cachePath = new File (cacheDir , "core_cache" );
114117
115118 CoreWrapper .CoreOptions coreOptions = new CoreWrapper .CoreOptions ();
116119 coreOptions .inputPath = m_passwordTestFile .getAbsolutePath ();
117120 coreOptions .outputPath = outputDir .getPath ();
118121 coreOptions .password = "wrongpassword" ;
119122 coreOptions .editable = false ;
123+ coreOptions .cachePath = cachePath .getPath ();
120124
121125 CoreWrapper .CoreResult coreResult = CoreWrapper .parse (coreOptions );
122126 Assert .assertEquals (-2 , coreResult .errorCode );
@@ -126,12 +130,14 @@ public void testPasswordProtectedDocumentWithWrongPassword() {
126130 public void testPasswordProtectedDocumentWithCorrectPassword () {
127131 File cacheDir = InstrumentationRegistry .getInstrumentation ().getTargetContext ().getCacheDir ();
128132 File outputDir = new File (cacheDir , "output_password_test" );
133+ File cachePath = new File (cacheDir , "core_cache" );
129134
130135 CoreWrapper .CoreOptions coreOptions = new CoreWrapper .CoreOptions ();
131136 coreOptions .inputPath = m_passwordTestFile .getAbsolutePath ();
132137 coreOptions .outputPath = outputDir .getPath ();
133138 coreOptions .password = "passwort" ;
134139 coreOptions .editable = false ;
140+ coreOptions .cachePath = cachePath .getPath ();
135141
136142 CoreWrapper .CoreResult coreResult = CoreWrapper .parse (coreOptions );
137143 Assert .assertEquals (0 , coreResult .errorCode );
0 commit comments