use of org.junit.jupiter.api.Test in project java-design-patterns by iluwatar.
the class IntegrationTest method testGetAuthorsCount.
@Test
public void testGetAuthorsCount() {
BigInteger authorCount = queryService.getAuthorsCount();
assertEquals(new BigInteger("2"), authorCount);
}
use of org.junit.jupiter.api.Test in project java-design-patterns by iluwatar.
the class IntegrationTest method testGetAuthorByUsername.
@Test
public void testGetAuthorByUsername() {
Author author = queryService.getAuthorByUsername("username1");
assertEquals("username1", author.getUsername());
assertEquals("name1", author.getName());
assertEquals("email1", author.getEmail());
}
use of org.junit.jupiter.api.Test in project java-design-patterns by iluwatar.
the class StatusMemberTest method statusRecordsTheStartTime.
@Test
public void statusRecordsTheStartTime() {
// given
final LocalDateTime startTime = LocalDateTime.of(2017, Month.APRIL, 1, 19, 9);
final StartingData startingData = new StartingData(startTime);
final StatusMember statusMember = new StatusMember(1);
// when
statusMember.accept(startingData);
// then
assertEquals(startTime, statusMember.getStarted());
}
use of org.junit.jupiter.api.Test in project java-design-patterns by iluwatar.
the class DelegateTest method testEpsonPrinter.
@Test
public void testEpsonPrinter() throws Exception {
PrinterController printerController = new PrinterController(new EpsonPrinter());
printerController.print(MESSAGE);
assertEquals("Epson Printer : Test Message Printed", appender.getLastMessage());
}
use of org.junit.jupiter.api.Test in project java-design-patterns by iluwatar.
the class DelegateTest method testHpPrinter.
@Test
public void testHpPrinter() throws Exception {
PrinterController printerController = new PrinterController(new HpPrinter());
printerController.print(MESSAGE);
assertEquals("HP Printer : Test Message Printed", appender.getLastMessage());
}
Aggregations