1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package dev.aherscu.qa.testing.example.scenarios.tutorial6;
18
19 import static dev.aherscu.qa.testing.utils.StreamMatchersExtensions.hasSpecificItems;
20
21 import org.testng.annotations.*;
22
23 import dev.aherscu.qa.jgiven.commons.utils.*;
24 import dev.aherscu.qa.jgiven.rest.model.*;
25 import dev.aherscu.qa.jgiven.rest.tags.*;
26 import dev.aherscu.qa.testing.utils.rest.*;
27 import dev.aherscu.qa.testing.example.*;
28 import dev.aherscu.qa.testing.example.model.tutorial.*;
29 import dev.aherscu.qa.testing.example.steps.tutorial.*;
30 import jakarta.ws.rs.client.*;
31
32 @RestTest
33 @Ignore("does not work from github")
34 public class Binance extends
35 ConfigurableScenarioTest<TestConfiguration, RestScenarioType, BinanceFixtures<?>, BinanceActions<?>, BinanceVerifications<?>> {
36
37 protected Binance() {
38 super(TestConfiguration.class);
39 }
40
41 protected Client client;
42
43 @AfterClass
44 protected void afterClassCloseRestClient() {
45 client.close();
46 }
47
48 @BeforeClass
49 protected void beforeClassOpenRestClient() {
50 client = LoggingClientBuilder.newClient();
51 }
52
53 @Test
54 public void shouldGetExchangeInfo() {
55 given()
56 .binance(client)
57 .with(configuration());
58
59 when()
60 .doing_nothing();
61
62
63
64
65
66
67 then()
68 .the_exchange_info(hasSpecificItems(Symbol.builder()
69 .symbol("BTCUSDT")
70 .baseAsset("BTC")
71 .contractType("PERPETUAL")
72 .build()));
73 }
74 }