mockk/mockk

Feature Request - Suppress & WhiteBox like feature in mockK

Open

#818 geöffnet am 4. Mai 2022

Auf GitHub ansehen
 (9 Kommentare) (2 Reaktionen) (1 zugewiesene Person)Kotlin (364 Forks)batch import
enhancementgood first issuehacktoberfest

Repository-Metriken

Stars
 (5.540 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 4T 7h) (7 gemergte PRs in 30 T)

Beschreibung

  • I am running the latest

  • I checked the documentation and found no

  • I checked to make sure that this issue has not already been filed

Feature/Function Requests

Suppress unwanted behaviour

I'm using the MockK library to write my kotlin android unit tests and it's really pain in my ass while writing unit tests for Android activity classes which have override methods like onCreate(), onResume(), onNewIntent() etc that call their parent classes.

I'm looking for a feature in mockk with which i can suppress the parent class calls and complete my unit tests peacefully. Currently I've to write hybrid unit tests by using PowerMockito along with mockK library to use the suppress functionality provided by PowerMockito, due to lack of such cool feature or function in mockK.

WhiteBox

WhiteBox is another useful one from PowerMockito which is missing in mockK and would really be helpful if available on this library.

Current Specs:

  • MockK version: V1.12.3
  • OS: Mac OS
  • Kotlin version: 1.6.0

Contributor Guide