test: NbpService#getFetchDate tests

This commit is contained in:
Piotr Dec 2024-05-23 21:08:26 +02:00
parent 2e4ca845f8
commit 310a4c4087
Signed by: stawros
GPG key ID: F89F27AD8F881A91
4 changed files with 92 additions and 6 deletions

View file

@ -0,0 +1,16 @@
package eu.ztsh.wymiana.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import java.time.Clock;
@Configuration
public class ClockConfiguration {
@Bean
public Clock clock() {
return Clock.systemDefaultZone();
}
}

View file

@ -1,17 +1,22 @@
package eu.ztsh.wymiana.service;
import eu.ztsh.wymiana.model.Rates;
import lombok.RequiredArgsConstructor;
import org.assertj.core.util.VisibleForTesting;
import org.springframework.stereotype.Service;
import java.time.Clock;
import java.time.LocalDate;
/**
* NBP exchange rates service
*/
@Service
@RequiredArgsConstructor
public class NbpService {
private final Clock clock;
public double getSellRate(String currency) {
throw new UnsupportedOperationException("Not implemented yet");
}