0
0
mirror of https://github.com/ankidroid/Anki-Android.git synced 2024-09-20 12:02:16 +02:00

refactor: Convert StatsTest to Kotlin

com.ichi2.libanki.StatsTest
This commit is contained in:
David Allison 2022-08-20 21:27:27 +01:00 committed by lukstbit
parent bf7a6e12cf
commit 3ab56ff522
2 changed files with 13 additions and 19 deletions

View File

@ -42,8 +42,8 @@ permission notice:
// Example of class name: "/com/ichi2/anki/UIUtils.kt"
// Ensure that it starts with '/' (slash)
def source = Source.TEST
def className = "/com/ichi2/libanki/StatsTest.kt"
def source = Source.MAIN
def className = ""
enum Source {
MAIN("/src/main/java"),

View File

@ -13,28 +13,22 @@
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.ichi2.libanki
package com.ichi2.libanki;
import com.ichi2.anki.RobolectricTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import androidx.test.ext.junit.runners.AndroidJUnit4;
@RunWith(AndroidJUnit4.class)
public class StatsTest extends RobolectricTest {
import androidx.test.ext.junit.runners.AndroidJUnit4
import com.ichi2.anki.RobolectricTest
import org.junit.Test
import org.junit.runner.RunWith
@RunWith(AndroidJUnit4::class)
class StatsTest : RobolectricTest() {
/*****************
** Stats *
*****************/
* Stats *
*/
@Test
public void empty_test() {
fun empty_test() {
// A test should occurs in the file, otherwise travis rejects. This remains here until we can uncomment the real tests.
}
/* TODO put in Collection
} /* TODO put in Collection
@Test
public void test_stats() throws Exception {
Collection col = getCol();