mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2025-10-25 20:37:40 +00:00
Mock openAndTruncateStream instead of getStream in test
This commit is contained in:
@@ -55,7 +55,7 @@ class ImportExportManagerTest {
|
|||||||
`when`(sharedPreferences.all).thenReturn(expectedPreferences)
|
`when`(sharedPreferences.all).thenReturn(expectedPreferences)
|
||||||
|
|
||||||
val output = File.createTempFile("newpipe_", "")
|
val output = File.createTempFile("newpipe_", "")
|
||||||
`when`(storedFileHelper.stream).thenReturn(FileStream(output))
|
`when`(storedFileHelper.openAndTruncateStream()).thenReturn(FileStream(output))
|
||||||
ImportExportManager(fileLocator).exportDatabase(sharedPreferences, storedFileHelper)
|
ImportExportManager(fileLocator).exportDatabase(sharedPreferences, storedFileHelper)
|
||||||
|
|
||||||
val zipFile = ZipFile(output)
|
val zipFile = ZipFile(output)
|
||||||
|
|||||||
Reference in New Issue
Block a user