C
C
coden552016-05-02 09:16:47
Java
coden55, 2016-05-02 09:16:47

Within the method body, a specific other must be called. How to make a check?

interface ResultListener {
void onGetResult(Request request);
}
In the implementation of onGetResult(Request request); the request.destroy() method must be called;
The error should be reported to the IDE to avoid memory leaks.
Are there solutions? I hope I explained what is needed clearly :)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
protven, 2016-05-02
@coden55

This should be done not with the IDE, but with the help of unit tests.
In your case, it will probably be easiest to use Mockito. It allows you to check that some method has been called.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question