Commit 1faaf429 authored by Angelo Veltens's avatar Angelo Veltens

assert generated code in acceptance test

parent bd76e8a0
......@@ -26,10 +26,11 @@ class TicketScannerFeature {
TicketScanner ticketScanner = new TicketScanner(codeGenerator, registeredTickets);
Ticket registeredTicket = new Ticket(UUID.randomUUID());
// when
Code code = ticketScanner.register(registeredTicket);
Ticket scannedTicket = ticketScanner.scan(code);
CheckIn checkIn = ticketScanner.checkIn(code);
Code generatedCode = ticketScanner.register(registeredTicket);
Ticket scannedTicket = ticketScanner.scan(generatedCode);
CheckIn checkIn = ticketScanner.checkIn(generatedCode);
// then
assertThat(generatedCode).isEqualTo(new Code("WHATEVER"));
assertThat(scannedTicket).isEqualTo(registeredTicket);
assertThat(checkIn.isSuccessful()).isTrue();
}
......
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