feat: CurrencyService outline & tests

This commit is contained in:
Piotr Dec 2024-05-24 01:22:34 +02:00
parent 27ff8e4e32
commit b07fa4cb65
Signed by: stawros
GPG key ID: F89F27AD8F881A91
3 changed files with 80 additions and 0 deletions

View file

@ -0,0 +1,9 @@
package eu.ztsh.wymiana.exception;
public class InsufficientFundsException extends RuntimeException {
public InsufficientFundsException() {
super("Insufficient funds");
}
}

View 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");
}
}