Should we make implementation public ?

59 views
Skip to first unread message

suraj chhetry

unread,
Jan 11, 2017, 5:51:01 AM1/11/17
to CDI-Unit
Hi All,
Good Evening !

I have multi module maven project where data-module,service-module and ui-module are present.I have written test for data module which is working fine but I am facing problem while testing service layer because in order to test service layer I have to make UserDaoImpl public which I don't want to do.So is there better way we can do with CDI-Unit.

abc-data-module
public interface UserDao{
  public void addUser(User user);
}
@Named
UserDaoImpl implements UserDao{}

abc-service-module
public interface UserService{
}

@Named
UserServiceImpl implements UserService {
   @Inject
   private UserDao userdao;
}

Thanks
Suraj



Adrian Mitev

unread,
Jan 29, 2018, 9:26:21 AM1/29/18
to CDI-Unit
Reply all
Reply to author
Forward
0 new messages