You can define the method in a trait which your object extends. Then simply mock the trait: trait Login { def login(userName: String, password: String): ...
確定! 回上一頁