Search:

Type: Posts; User: intelrate

Search: Search took 0.62 seconds.

  1. Re: How to mock protected method in Java

    Thanks JavaPF.

    Just found another solution with CGLIB if interesting. Refactoring sometimes allows to resolve the problem as well.

    Cheers!
  2. Better solution in JMock or other Java framework to have same number of parameters as protected method has

    Here is a question.

    I wanted my JUnit tests to be more modular and found how to mock protected methods for that purpose. Briefly speaking, we cannot mock and control calls of protected method with...
  3. Replies
    2
    Views
    2,528

    Re: Java Variable Conversions

    Hi

    String.valueOf(...) is better for primitive types because there is no need to create new instance of wrapper Object.
Results 1 to 3 of 3