Fix the download progress not updating

Integer roundoff errors...
This commit is contained in:
Bradlee Speice
2014-11-20 23:19:06 -05:00
parent 06ae1c0ed6
commit 90db3e6a1a
4 changed files with 38 additions and 26 deletions

View File

@ -0,0 +1,20 @@
/**
* Created by bspeice on 11/20/14.
*/
import org.junit.Test
import org.bspeice.minimalbible.activity.downloader.manager.DLProgressEvent
import org.crosswire.jsword.book.Book
import org.mockito.Mockito
import org.junit.Assert
class DLProgressEventTest {
val b = Mockito.mock(javaClass<Book>())
Test fun fiftyPercentIsOneEighty() {
val e = DLProgressEvent(50, b)
Assert.assertEquals(180, e.toCircular())
}
}