feat: CurrencyService outline & tests
This commit is contained in:
parent
27ff8e4e32
commit
b07fa4cb65
3 changed files with 80 additions and 0 deletions
|
@ -0,0 +1,9 @@
|
|||
package eu.ztsh.wymiana.exception;
|
||||
|
||||
public class InsufficientFundsException extends RuntimeException {
|
||||
|
||||
public InsufficientFundsException() {
|
||||
super("Insufficient funds");
|
||||
}
|
||||
|
||||
}
|
21
src/main/java/eu/ztsh/wymiana/service/CurrencyService.java
Normal file
21
src/main/java/eu/ztsh/wymiana/service/CurrencyService.java
Normal file
|
@ -0,0 +1,21 @@
|
|||
package eu.ztsh.wymiana.service;
|
||||
|
||||
import eu.ztsh.wymiana.model.User;
|
||||
import eu.ztsh.wymiana.validation.InstanceValidator;
|
||||
import eu.ztsh.wymiana.web.model.CurrencyExchangeRequest;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class CurrencyService {
|
||||
|
||||
private final UserService userService;
|
||||
private final NbpService nbpService;
|
||||
private final InstanceValidator validator;
|
||||
|
||||
public User exchange(CurrencyExchangeRequest request) {
|
||||
throw new UnsupportedOperationException("Not implemented yet");
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue