Interface MockBuilder

All Known Implementing Classes:
MockitoMockBuilder, PowerMockBuilder

public interface MockBuilder
mock builder interface
Author:
huangliang
  • Method Details

    • isMockable

      boolean isMockable(Field field, Type testedClass)
      true - field can be mocked
    • getImmockabiliyReason

      String getImmockabiliyReason(String prefix, Field field)
      constructs an error message explaining why field cannot be mocked
      Parameters:
      prefix - add prefix to message
      field - reported field
      Returns:
      an error message explaining why field cannot be mocked
    • buildMockArgsMatchers

      String buildMockArgsMatchers(List<Param> params, String language)
      constructs mocked arguments expression
      Parameters:
      params - method params being mocked
      language - String representation of test code Language
      Returns:
      mocked arguments expression
      See Also:
    • isMockExpected

      boolean isMockExpected(Field field)
      Returns:
      true - if Field should be mocked