Should adapters or wrappers be unit tested?

Posted by m3th0dman on Programmers See other posts from Programmers or by m3th0dman
Published on 2012-11-19T07:26:36Z Indexed on 2012/11/19 11:33 UTC
Read the original article Hit count: 350

Filed under:
|

Suppose that I have a class that implements some logic:

public MyLogicImpl implements MyLogic {
    public void myLogicMethod() {
        //my logic here
    }
}

and somewhere else a test class:

public MyLogicImplTest {
    @Test
    public void testMyLogicMethod() {
        /test my logic
    }
}

I also have:

@WebService
public MyWebServices class {
    @Inject
    private MyLogic myLogic;

    @WebMethod
    public void myLogicWebMethod() {
        myLogic.myLogicMethod();
    }
}

Should there be a test unit for myLogicWebMethod or should the testing for it be handled in integration testing.

© Programmers or respective owner

Related posts about testing

Related posts about unit-testing