8000 Why i can't mock a method call for super class ? · Issue #1164 · powermock/powermock · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
8000
Why i can't mock a method call for super class ? #1164
Open
@lingluan533

Description

@lingluan533

Hey,

i hava a method inputTxt(ParamType param) in Father class ,and i invoke inputTxt in Child class, i want to test Child class and i want to mock inputTxt method. How can i do ,i have tried many plan but not get expected value.
like :
Method inputEnTxt = PowerMockito.method(Father.class, "inputTxt", ParamaType.class);
PowerMockito.replace(inputTxt).with(new InvocationHandler() {
@OverRide
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
return true;
}
});

it's still to call real method inputTxt.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0