AppWatcherTest.kt
TLDR
This file contains a unit test class AppWatcherTest
for the AppWatcher
class in the leakcanary
package. The test checks if AppWatcher.isInstalled
returns false
when the application is not installed.
Classes
AppWatcherTest
This class is a unit test class for the AppWatcher
class in the leakcanary
package. The AppWatcherTest
class contains a single test method appWatcherLoads_notInstalled
. This test method checks if AppWatcher.isInstalled
returns false
when the application is not installed. The test uses the assertThat
method from the org.assertj.core.api.Assertions
class to verify the result.
package leakcanary
import org.assertj.core.api.Assertions.assertThat
import org.junit.Test
class AppWatcherTest {
@Test fun appWatcherLoads_notInstalled() {
assertThat(AppWatcher.isInstalled)
.describedAs("Ensure AppWatcher doesn't crash in JUnit tests")
.isFalse()
}
}