Search in sources :

Example 31 with Test

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);
}
Also used : BigInteger(java.math.BigInteger) Test(org.junit.jupiter.api.Test)

Example 32 with Test

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());
}
Also used : Author(com.iluwatar.cqrs.dto.Author) Test(org.junit.jupiter.api.Test)

Example 33 with Test

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());
}
Also used : LocalDateTime(java.time.LocalDateTime) StartingData(com.iluwatar.databus.data.StartingData) Test(org.junit.jupiter.api.Test)

Example 34 with Test

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());
}
Also used : EpsonPrinter(com.iluwatar.delegation.simple.printers.EpsonPrinter) Test(org.junit.jupiter.api.Test)

Example 35 with Test

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());
}
Also used : HpPrinter(com.iluwatar.delegation.simple.printers.HpPrinter) Test(org.junit.jupiter.api.Test)

Aggregations

Test (org.junit.jupiter.api.Test)265 BigInteger (java.math.BigInteger)50 JsonObject (io.vertx.core.json.JsonObject)20 NemAnnounceResult (com.github.rosklyar.client.transaction.domain.NemAnnounceResult)15 PublicAccount (io.nem.sdk.model.account.PublicAccount)14 AnalysisResult (io.github.vocabhunter.analysis.model.AnalysisResult)12 Address (io.nem.sdk.model.account.Address)10 NamespaceId (io.nem.sdk.model.namespace.NamespaceId)10 ExecutorService (java.util.concurrent.ExecutorService)9 UnconfirmedTransactions (com.github.rosklyar.client.account.domain.transaction.UnconfirmedTransactions)7 MosaicId (com.github.rosklyar.client.transaction.domain.mosaic.MosaicId)7 Transactions (com.github.rosklyar.client.account.domain.transaction.Transactions)6 PsiClass (com.intellij.psi.PsiClass)6 Mosaic (io.nem.sdk.model.mosaic.Mosaic)6 MosaicId (io.nem.sdk.model.mosaic.MosaicId)6 Disabled (org.junit.jupiter.api.Disabled)6 DisplayName (org.junit.jupiter.api.DisplayName)6 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)6 InOrder (org.mockito.InOrder)6 SpellDao (com.iluwatar.servicelayer.spell.SpellDao)5