Re: [Dev] Code coverage percentage

2015-06-03 Thread Krishantha Samaraweera
Its because your class contain only 11 lines :) Thanks, Krishantha. On Wed, Jun 3, 2015 at 12:25 PM, Gihan Anuruddha wrote: > Hi Krishantha, > > I covered the areas that I need to test in that class. But due to that > private constructor, code coverage percentage affects drastically :( > > Rega

Re: [Dev] Code coverage percentage

2015-06-02 Thread Gihan Anuruddha
Hi Krishantha, I covered the areas that I need to test in that class. But due to that private constructor, code coverage percentage affects drastically :( Regards, Gihan On Wed, Jun 3, 2015 at 12:16 PM, Krishantha Samaraweera wrote: > Hi Gihan, > > I think you are writing integration test to c

Re: [Dev] Code coverage percentage

2015-06-02 Thread Krishantha Samaraweera
Hi Gihan, I think you are writing integration test to cover the case. If it is the case, generating coverage for empty private method is not possible. There is a bug reported in Emma to skip the empty private constructors [1]. If it is a unit test, you can use java reflection to call private meth

Re: [Dev] Code coverage percentage

2015-06-02 Thread Gihan Anuruddha
Hi Saneth, No. We are only using static methods in that class. So there is no need to call that private method. That was only added as suggest by sonar. Regards, Gihan On Wed, Jun 3, 2015 at 11:58 AM, Saneth Dharmakeerthi wrote: > Hi Gihan, > > Isn't that private constructor is get called by a

Re: [Dev] Code coverage percentage

2015-06-02 Thread Saneth Dharmakeerthi
Hi Gihan, Isn't that private constructor is get called by anywhere inside that class?. Thanks and Best Regards, Saneth Dharmakeerthi Senior Software Engineer WSO2, Inc. Mobile: +94772325511 On Wed, Jun 3, 2015 at 11:47 AM, Gihan Anuruddha wrote: > Hi Automation team, > > What we are actually

[Dev] Code coverage percentage

2015-06-02 Thread Gihan Anuruddha
Hi Automation team, What we are actually looking as a code coverage stat? In my ServiceHolder class, I added private constructor based on sonar suggestion. Now, due to that I can't make my class, 100% code coverage in term of line, block and method. How do I overcome this problem and increase my