test: NbpService#getFetchDate tests
This commit is contained in:
parent
2e4ca845f8
commit
310a4c4087
4 changed files with 92 additions and 6 deletions
16
src/main/java/eu/ztsh/wymiana/config/ClockConfiguration.java
Normal file
16
src/main/java/eu/ztsh/wymiana/config/ClockConfiguration.java
Normal 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();
|
||||
}
|
||||
|
||||
}
|
|
@ -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");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue