Code coverage is missing for class implemented using builder pattern

30 views
Skip to first unread message

JEGANATHAN VASUDEVAN

unread,
Jan 6, 2018, 2:05:20 AM1/6/18
to JaCoCo and EclEmma Users

Hello,
 
Good evening!

I am new to Jacoco code coverage. We are running into one issue where our Jacoco coverage report is missing for classes implemented using builder pattern. is there a way to handle this?. Appreciate your time!

Note:We are getting FallBackViewModel (inside the build() function)  code is 100% covered but not FallBackViewModelBuilder.

Example:
@ViewModelBuilder(viewModelKey = "FALL_BACK")
public class FallBackViewModelBuilder implements IViewModelBuilder {

    @Override
    public List<BaseViewModel> build(OfferExpContext context,
        DomainModelRepository domainModelRepository, ViewModelRepository viewModelRepository) {
        FallBackViewModel viewModel = new FallBackViewModel();
        .............
        ....
    }

    @Override
    public boolean isErrorState(OfferExpContext context) {
        return false;
    }


    public boolean isModuleGroupApplicable(OfferExpContext context) {
        .....
        .....
        return false;
    }

    @Override
    public boolean isMobileModel(OfferExpContext context) {
        return false;
    }
}


Thanks,
Jegan

Marc Hoffmann

unread,
Jan 8, 2018, 4:38:36 AM1/8/18
to jac...@googlegroups.com

Hi Jegan

no idea what the @ViewModelBuilder annotation does and what tool processes it.

To analyze your problem please provide a executable reproducer (e.g. in GitHub Repo).

Regards,
-marc

--
You received this message because you are subscribed to the Google Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jacoco+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/6f2af8e9-f1ac-4305-91a4-6c7693a5555d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

 

Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages