Skip to content

Commit

Permalink
Added the test file locally.
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulWoitaschek committed Jul 30, 2017
1 parent 3b6bcfe commit a60e5e5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
1 change: 0 additions & 1 deletion chapterreader/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ dependencies {

testCompile libraries.assertJ
testCompile libraries.junit
testCompile libraries.okHttp
}

sourceSets {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package de.ph1b.audiobook.chapterreader.id3

import de.ph1b.audiobook.chapterreader.matroska.NoOpLogger
import okhttp3.OkHttpClient
import okhttp3.Request
import org.assertj.core.api.Assertions.assertThat
import org.junit.Test

Expand All @@ -15,13 +13,9 @@ class ID3ChapterReaderTest {

@Test
fun readInputStream() {
val client = OkHttpClient.Builder().build()
val request = Request.Builder()
.url("https://auphonic.com/media/blog/auphonic_chapters_demo.mp3")
.build()
val call = client.newCall(request)
val inputStream = call.execute().body()!!.byteStream()
val chapters = id3ChapterReader.readInputStream(inputStream)
val file = javaClass.classLoader.getResource("id3/simple.mp3")

val chapters = id3ChapterReader.readInputStream(file.openStream())

assertThat(chapters).isEqualTo(mapOf(
0 to "Intro",
Expand Down
Binary file added chapterreader/src/test/resources/id3/simple.mp3
Binary file not shown.

0 comments on commit a60e5e5

Please sign in to comment.