1515use Peso \Core \Requests \HistoricalExchangeRateRequest ;
1616use Peso \Core \Responses \ErrorResponse ;
1717use Peso \Core \Services \SDK \Exceptions \HttpFailureException ;
18- use Peso \Services \CzechNationalBankOtherCurrenciesService ;
19- use Peso \Services \CzechNationalBankService ;
18+ use Peso \Services \CzechNationalBank \ OtherCurrenciesService ;
19+ use Peso \Services \CzechNationalBank \ CentralBankFixingService ;
2020use PHPUnit \Framework \TestCase ;
2121use stdClass ;
2222
2323final class EdgeCasesTest extends TestCase
2424{
2525 public function testInvalidRequest (): void
2626 {
27- $ service = new CzechNationalBankService ();
27+ $ service = new CentralBankFixingService ();
2828
2929 $ response = $ service ->send (new stdClass ());
3030 self ::assertInstanceOf (ErrorResponse::class, $ response );
@@ -34,7 +34,7 @@ public function testInvalidRequest(): void
3434
3535 public function testInvalidRequestOther (): void
3636 {
37- $ service = new CzechNationalBankOtherCurrenciesService ();
37+ $ service = new OtherCurrenciesService ();
3838
3939 $ response = $ service ->send (new stdClass ());
4040 self ::assertInstanceOf (ErrorResponse::class, $ response );
@@ -47,7 +47,7 @@ public function testFutureDate(): void
4747 $ clock = StaticClock::fromDateString ('2025-06-18 ' ); // 'now'
4848 $ future = Calendar::parse ('2025-06-19 ' );
4949
50- $ service = new CzechNationalBankService (clock: $ clock );
50+ $ service = new CentralBankFixingService (clock: $ clock );
5151
5252 $ response = $ service ->send (new HistoricalExchangeRateRequest ('EUR ' , 'CZK ' , $ future ));
5353 self ::assertInstanceOf (ErrorResponse::class, $ response );
@@ -60,7 +60,7 @@ public function testFutureDateOther(): void
6060 $ clock = StaticClock::fromDateString ('2025-06-18 ' ); // 'now'
6161 $ future = Calendar::parse ('2025-06-19 ' );
6262
63- $ service = new CzechNationalBankOtherCurrenciesService (clock: $ clock );
63+ $ service = new OtherCurrenciesService (clock: $ clock );
6464
6565 $ response = $ service ->send (new HistoricalExchangeRateRequest ('EUR ' , 'CZK ' , $ future ));
6666 self ::assertInstanceOf (ErrorResponse::class, $ response );
@@ -73,7 +73,7 @@ public function testHttpFailure(): void
7373 $ http = new Client ();
7474 $ http ->setDefaultResponse (new Response (500 , body: 'Server error or something ' ));
7575
76- $ service = new CzechNationalBankService (httpClient: $ http );
76+ $ service = new CentralBankFixingService (httpClient: $ http );
7777
7878 self ::expectException (HttpFailureException::class);
7979 self ::expectExceptionMessage ('HTTP error 500. Response is "Server error or something" ' );
@@ -85,7 +85,7 @@ public function testHttpFailureOther(): void
8585 $ http = new Client ();
8686 $ http ->setDefaultResponse (new Response (500 , body: 'Server error or something ' ));
8787
88- $ service = new CzechNationalBankOtherCurrenciesService (httpClient: $ http );
88+ $ service = new OtherCurrenciesService (httpClient: $ http );
8989
9090 self ::expectException (HttpFailureException::class);
9191 self ::expectExceptionMessage ('HTTP error 500. Response is "Server error or something" ' );
@@ -97,7 +97,7 @@ public function testInvalidDateInResponse(): void
9797 $ http = new Client ();
9898 $ http ->setDefaultResponse (new Response (body: 'Not a date ' ));
9999
100- $ service = new CzechNationalBankService (httpClient: $ http );
100+ $ service = new CentralBankFixingService (httpClient: $ http );
101101
102102 self ::expectException (Error::class);
103103 self ::expectExceptionMessage ('Invalid date. Format change? ' );
@@ -113,7 +113,7 @@ public function testInvalidHeaderInResponse(): void
113113 Val1|1|1000
114114 BODY ));
115115
116- $ service = new CzechNationalBankService (httpClient: $ http );
116+ $ service = new CentralBankFixingService (httpClient: $ http );
117117
118118 self ::expectException (Error::class);
119119 self ::expectExceptionMessage ('Invalid header. Format change? ' );
0 commit comments