Commit 3c8f037a authored by Julien Sadaoui's avatar Julien Sadaoui
Browse files

fix: wording

parent 4e49516c
......@@ -95,7 +95,7 @@ public class Level5 {
*/
public static void exercise3() {
log.info("Start Level5/Exercise3");
var data = List.of("Flash McQueen", "The King");
var data = List.of("Flash McQueen", "The King", "Martin", "Sally Carrera");
Flowable.fromIterable(data)
.map(String::toUpperCase)
......
......@@ -154,7 +154,7 @@ public class Level6 {
* <li>[RxSingleScheduler-1] Completed</li>
* </ul>
*
* Remarque: La méthode {@link Observable#subscribeOn} permet de changer le {@link Thread} du consommateur.
* Remarque: La méthode {@link Observable#observeOn} permet de changer le {@link Thread} du consommateur.
*/
public static void exercise3() {
log.info("Start Level6/Exercise3");
......
......@@ -140,8 +140,8 @@ public class Level7 {
testSubscriber.assertValues(1L, 2L, 3L);
testSubscriber.requestMore(4);
scheduler.advanceTimeBy(700, TimeUnit.MILLISECONDS);
testSubscriber.assertValues(1L, 2L, 3L, 7L, 8L, 9L, 10L);
scheduler.advanceTimeBy(3, TimeUnit.MILLISECONDS);
testSubscriber.assertValues(1L, 2L, 3L, 7L);
}
}
......@@ -59,7 +59,7 @@ Passons maintenant au développement de ce **Coding Dojo**, vous trouverez desso
- Utilisez l'implémentation **MongoReactiveUserDetailsService** permettant de récupérer l'utilisateur dans la base MongoDB
Vous devez maintenant être capables de vous authentifier dans l'application en mode réactif avec l'un des utilisateurs
créés par le Bean InitialSetupMigration (par exemple: customer@email.org / Pa$$word1)
créés par le Bean InitialSetupMigration (par exemple: customer@bank.com / Pa$$word1)
### B. Développement de la gestion des comptes
......
......@@ -31,7 +31,7 @@ public class Account {
private BigDecimal balance;
@Builder.Default
private Set<Transaction> transactions;
private Set<Transaction> transactions = new HashSet<>();
@NotEmpty
private String customerId;
......
......@@ -82,7 +82,6 @@ public class AccountServiceImpl implements AccountService {
@PreAuthorize("hasRole('CUSTOMER')")
public Flux<Transaction> getTransactions(String customerId, String accountNumber) {
return accountRepository.findByCustomerIdAndNumber(customerId, accountNumber)
.map(Account::getTransactions)
.flatMapMany(Flux::fromIterable);
.flatMapIterable(Account::getTransactions);
}
}
......@@ -51,7 +51,7 @@ public class AccountResource {
log.debug("REST request to open Account : {}", account);
return userService.getUser(account.getCustomerId())
.flatMap(user -> accountService.openAccount(account))
.map(createdAccount -> ResponseEntity.created(uriComponentsBuilder.path("/account/{number")
.map(createdAccount -> ResponseEntity.created(uriComponentsBuilder.path("/account/{number}")
.buildAndExpand(createdAccount.getNumber()).toUri())
.body(createdAccount))
.switchIfEmpty(Mono.just(ResponseEntity.notFound().build()));
......@@ -64,4 +64,4 @@ public class AccountResource {
.then(Mono.just(ResponseEntity.noContent().build()));
}
}
\ No newline at end of file
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment