Merge pull request #831 from cyian-1756/moreUtilsUnitTests

Added some more unit tests
This commit is contained in:
cyian-1756 2018-07-31 08:37:17 -04:00 committed by GitHub
commit bf4553885a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,6 +3,9 @@ package com.rarchives.ripme.tst;
import junit.framework.TestCase;
import com.rarchives.ripme.utils.Utils;
import java.util.ArrayList;
import java.util.Arrays;
public class UtilsTest extends TestCase {
public void testGetEXTFromMagic() {
@ -31,4 +34,12 @@ public class UtilsTest extends TestCase {
assert(!Utils.getListOfAlbumRippers().isEmpty());
}
public void testGetByteStatusText() {
assertEquals("5% - 500.00iB / 97.66KiB", Utils.getByteStatusText(5, 500, 100000));
}
public void testBetween() {
assertEquals(Arrays.asList(" is a "), Utils.between("This is a test", "This", "test"));
}
}