Skip to content

Commit

Permalink
converted java tests to kotlin
Browse files Browse the repository at this point in the history
  • Loading branch information
delet-dis committed Jan 11, 2021
1 parent 7d4825a commit 70bb916
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 43 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package com.delet_dis.bubbles

import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.platform.app.InstrumentationRegistry
import org.junit.Assert
import org.junit.Test
import org.junit.runner.RunWith

/**
* Instrumented test, which will execute on an Android device.
*
* @see [Testing documentation](http://d.android.com/tools/testing)
*/
@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
@Test
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
Assert.assertEquals("com.delet_dis.bubbles", appContext.packageName)
}
}
17 changes: 0 additions & 17 deletions app/src/test/java/com/delet_dis/bubbles/ExampleUnitTest.java

This file was deleted.

16 changes: 16 additions & 0 deletions app/src/test/java/com/delet_dis/bubbles/ExampleUnitTest.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package com.delet_dis.bubbles

import org.junit.Assert
import org.junit.Test

/**
* Example local unit test, which will execute on the development machine (host).
*
* @see [Testing documentation](http://d.android.com/tools/testing)
*/
class ExampleUnitTest {
@Test
fun addition_isCorrect() {
Assert.assertEquals(4, (2 + 2).toLong())
}
}

0 comments on commit 70bb916

Please sign in to comment.