标签: java spring junit autowired setter
例如,是否有必要为以下方法编写Unit test:
Unit test
private PersonRepository personRepository; @Autowired public void setPersonRepository(PersonRepository personRepository) { this.personRepository = personRepository; }
测试的目的是什么?