From c83d93a2e375862311c24fecc4fda76b561f8927 Mon Sep 17 00:00:00 2001 From: cyian-1756 Date: Wed, 25 Jul 2018 03:42:50 -0400 Subject: [PATCH] Added some more unit tests --- src/test/java/com/rarchives/ripme/tst/UtilsTest.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/test/java/com/rarchives/ripme/tst/UtilsTest.java b/src/test/java/com/rarchives/ripme/tst/UtilsTest.java index d0789b39..f39604c2 100644 --- a/src/test/java/com/rarchives/ripme/tst/UtilsTest.java +++ b/src/test/java/com/rarchives/ripme/tst/UtilsTest.java @@ -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")); + } + }