-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Intro
We want to mock this method
List<Integer> getList() {
return new MyListImpl();
}
The most ideal target would be subclassing MyListImpl.
This might not be possible if MyListImpl is final. What is our next choice?
Previously, we did a DFS on MyListImpl, on the inheritance graph from MyListImpl to List, and use the closest class on the path to List.
But we can actually make a new class that implements every parent class of MyListImpl. This will have better robustness to class casting.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels