mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2026-04-21 14:21:23 +00:00
Changed the code accordingly
+ Removed some unused code
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
package org.schabi.newpipe.local.subscription.services;
|
||||
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.schabi.newpipe.extractor.subscription.SubscriptionExtractor;
|
||||
import org.schabi.newpipe.extractor.subscription.SubscriptionItem;
|
||||
@@ -11,9 +14,6 @@ import java.nio.charset.StandardCharsets;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
/**
|
||||
* @see ImportExportJsonHelper
|
||||
*/
|
||||
@@ -47,8 +47,8 @@ public class ImportExportJsonHelperTest {
|
||||
|
||||
fail("didn't throw exception");
|
||||
} catch (final Exception e) {
|
||||
final boolean isExpectedException
|
||||
= e instanceof SubscriptionExtractor.InvalidSourceException;
|
||||
final boolean isExpectedException =
|
||||
e instanceof SubscriptionExtractor.InvalidSourceException;
|
||||
assertTrue("\"" + e.getClass().getSimpleName()
|
||||
+ "\" is not the expected exception", isExpectedException);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
package org.schabi.newpipe.settings.tabs;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assert.fail;
|
||||
import static java.util.Objects.requireNonNull;
|
||||
|
||||
import com.grack.nanojson.JsonArray;
|
||||
import com.grack.nanojson.JsonObject;
|
||||
import com.grack.nanojson.JsonParser;
|
||||
@@ -11,11 +16,6 @@ import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import static java.util.Objects.requireNonNull;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
public class TabsJsonHelperTest {
|
||||
private static final String JSON_TABS_ARRAY_KEY = "tabs";
|
||||
private static final String JSON_TAB_ID_KEY = "tab_id";
|
||||
@@ -59,8 +59,8 @@ public class TabsJsonHelperTest {
|
||||
|
||||
fail("didn't throw exception");
|
||||
} catch (final Exception e) {
|
||||
final boolean isExpectedException
|
||||
= e instanceof TabsJsonHelper.InvalidJsonException;
|
||||
final boolean isExpectedException =
|
||||
e instanceof TabsJsonHelper.InvalidJsonException;
|
||||
assertTrue("\"" + e.getClass().getSimpleName()
|
||||
+ "\" is not the expected exception", isExpectedException);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user