From a183ff803d2bf472612ba10bdf8e120c4102a595 Mon Sep 17 00:00:00 2001 From: tom5079 Date: Mon, 2 May 2022 16:48:10 +0900 Subject: [PATCH] Delete SourceLoaderInstrumentedTest --- .../pupil/SourceLoaderInstrumentedTest.kt | 52 ------------------- 1 file changed, 52 deletions(-) delete mode 100644 app/src/androidTest/java/xyz/quaver/pupil/SourceLoaderInstrumentedTest.kt diff --git a/app/src/androidTest/java/xyz/quaver/pupil/SourceLoaderInstrumentedTest.kt b/app/src/androidTest/java/xyz/quaver/pupil/SourceLoaderInstrumentedTest.kt deleted file mode 100644 index 094248a0..00000000 --- a/app/src/androidTest/java/xyz/quaver/pupil/SourceLoaderInstrumentedTest.kt +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Pupil, Hitomi.la viewer for Android - * Copyright (C) 2021 tom5079 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -package xyz.quaver.pupil - -import android.app.Application -import android.content.pm.PackageManager -import android.util.Log -import androidx.test.ext.junit.runners.AndroidJUnit4 -import androidx.test.platform.app.InstrumentationRegistry -import org.junit.Test -import org.junit.runner.RunWith -import org.junit.Assert.* -import xyz.quaver.pupil.sources.isSourceFeatureEnabled -import xyz.quaver.pupil.sources.loadSource - -@RunWith(AndroidJUnit4::class) -class SourceLoaderInstrumentedTest { - - @Test - fun getPackages() { - val appContext = InstrumentationRegistry.getInstrumentation().targetContext - val application: Application = appContext.applicationContext as Application - - val packageManager = appContext.packageManager - - val packages = packageManager.getInstalledPackages( - PackageManager.GET_CONFIGURATIONS or - PackageManager.GET_META_DATA - ) - - val sources = packages.filter { it.isSourceFeatureEnabled } - - assertEquals(1, sources.size) - } - -} \ No newline at end of file