Package samples.overloading

Examples of samples.overloading.StaticAndInstanceMethodWithSameName


public class MethodWithSameNameButDifferentDefinitionTypeTest {

    @Test
    public void mockGatewayCanInvokeInstanceMethodWhenClassContainsStaticAndInstanceMethodWithSameName() throws Exception {
        final ChildA object = createMock(ChildA.class);
        StaticAndInstanceMethodWithSameName mock = createMock(StaticAndInstanceMethodWithSameName.class);

        expectNew(ChildA.class).andReturn(object);
        mock.overloaded((Parent) object);
        expectLastCall().once();

        replayAll();

        new StaticAndInstanceMethodWithSameNameUser().performInstaceInvocation(mock);
View Full Code Here

TOP

Related Classes of samples.overloading.StaticAndInstanceMethodWithSameName

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.