I try to repeat the code from the course. SQL queries should be created for initialization and run in public void setup(), but I faced with some problems:
- Cannot resolve method 'execute' in 'DatabaseClient'
- Reference to 'create' is ambiguous, both 'create(Publisher<? extends T>)' and 'create(Publisher<? extends T>, long)' match
code
@BeforeAll
public void setup() {
Hooks.onOperatorDebug();
List<String> statements = Arrays.asList(//
"DROP TABLE IF EXISTS player;",
"CREATE table player (id INT AUTO_INCREMENT NOT NULL, name VARCHAR2, age INT NOT NULL);");
statements.forEach(it -> client.execute(it) //
.fetch() //
.rowsUpdated() //
.as(StepVerifier::create) //
.expectNextCount(1) //
.verifyComplete());
}