Skip to content

Commit

Permalink
fixed failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Asad Salman committed May 25, 2021
1 parent 5834f46 commit b25a402
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ internal fun InstrumentationTestContext.getFlankTestMethods(
testFilter: TestFilter
): List<FlankTestMethod> =
getParametrizedClasses().let { parameterizedClasses: List<TestMethod> ->
DexParser.findTestMethods(test.local, listOf("org.junit.experimental.theories.Theory")).asSequence()
DexParser.findTestMethods(test.local, listOf("org.junit.experimental.theories.Theory"))
.asSequence()
.distinctBy { it.testName }
.filter(testFilter.shouldRun)
.filterNot(parameterizedClasses::belong)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class CreateAndroidTestContextKtTest {

// when
mockkObject(DexParser) {
every { findTestMethods(any()) } returns listOf(
every { findTestMethods(any(), any()) } returns listOf(
TestMethod("testMethod", listOf(mockk(relaxed = true))),
TestMethod("testMethod", listOf(mockk(relaxed = true))),
TestMethod("testMethod", listOf()),
Expand All @@ -127,7 +127,7 @@ class CreateAndroidTestContextKtTest {
)

mockkObject(DexParser) {
every { findTestMethods(any()) } returns listOf(
every { findTestMethods(any(), any()) } returns listOf(
TestMethod("foo.bar.TestClass1#test1", emptyList()),
TestMethod("foo.bar.TestClass1#test2", emptyList()),
TestMethod("foo.bar.TestClass2#test1", emptyList()),
Expand Down

0 comments on commit b25a402

Please # to comment.