Skip to content

Maple-pro/JMockK

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JMockK

A Java adapter for MockK tool.

To do list

Features:

  • mockk
  • spyk
  • spyk(Person(name())): use the target constructor
  • mockkStatic
  • unmockkStatic
  • mockkObject
  • unmockkObject
  • every { } -> when()
    • public methods
    • private methods
    • static methods
    • methods of object
  • returns { } -> thenReturn()
  • mock fields
    • field in class
    • static field
    • field in object

Robustness:

  • Multiple every
  • Use more complex parameter types and return types
  • Use JMockK in real android projects

We need the answers method to support the fields mocking.

Reference

About

A Java adapter for MockK library

Resources

Stars

Watchers

Forks

Packages

No packages published