Moved spring-mockito to testing-modules (#12476)
Co-authored-by: panagiotiskakos <panagiotis.kakos@libra-is.com>
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
package com.baeldung;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class UserService {
|
||||
|
||||
private NameService nameService;
|
||||
|
||||
@Autowired
|
||||
public UserService(NameService nameService) {
|
||||
this.nameService = nameService;
|
||||
}
|
||||
|
||||
public String getUserName(String id) {
|
||||
return nameService.getUserName(id);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user