Interface MockBuilder
- All Known Implementing Classes:
MockitoMockBuilder
,PowerMockBuilder
public interface MockBuilder
mock builder interface
- Author:
- huangliang
-
Method Summary
Modifier and TypeMethodDescriptionbuildMockArgsMatchers
(List<Param> params, String language) constructs mocked arguments expressiongetImmockabiliyReason
(String prefix, Field field) constructs an error message explaining why field cannot be mockedboolean
isMockable
(Field field, Type testedClass) true - field can be mockedboolean
isMockExpected
(Field field)
-
Method Details
-
isMockable
true - field can be mocked -
getImmockabiliyReason
constructs an error message explaining why field cannot be mocked- Parameters:
prefix
- add prefix to messagefield
- reported field- Returns:
- an error message explaining why field cannot be mocked
-
buildMockArgsMatchers
constructs mocked arguments expression -
isMockExpected
- Returns:
- true - if Field should be mocked
-