Search in sources :

Example 21 with Test

use of org.junit.jupiter.api.Test in project java-design-patterns by iluwatar.

the class RoyaltyObjectMotherTest method queenIsBlockingFlirtCauseDrunkKing.

@Test
public void queenIsBlockingFlirtCauseDrunkKing() {
    King drunkUnhappyKing = RoyaltyObjectMother.createDrunkKing();
    Queen notFlirtyQueen = RoyaltyObjectMother.createNotFlirtyQueen();
    drunkUnhappyKing.flirt(notFlirtyQueen);
    assertFalse(drunkUnhappyKing.isHappy());
}
Also used : King(com.iluwatar.objectmother.King) Queen(com.iluwatar.objectmother.Queen) Test(org.junit.jupiter.api.Test)

Example 22 with Test

use of org.junit.jupiter.api.Test in project java-design-patterns by iluwatar.

the class GWeatherTest method testTimePasses.

/**
 * Verify if the weather passes in the order of the {@link WeatherType}s
 */
@Test
public void testTimePasses() {
    final Race observer = mock(Race.class);
    final GWeather weather = new GWeather();
    weather.addObserver(observer);
    final InOrder inOrder = inOrder(observer);
    final WeatherType[] weatherTypes = WeatherType.values();
    for (int i = 1; i < 20; i++) {
        weather.timePasses();
        inOrder.verify(observer).update(weather, weatherTypes[i % weatherTypes.length]);
    }
    verifyNoMoreInteractions(observer);
}
Also used : InOrder(org.mockito.InOrder) WeatherType(com.iluwatar.observer.WeatherType) Test(org.junit.jupiter.api.Test)

Example 23 with Test

use of org.junit.jupiter.api.Test in project java-design-patterns by iluwatar.

the class AlbumListPageTest method testSelectAlbum.

@Test
public void testSelectAlbum() {
    AlbumPage albumPage = albumListPage.selectAlbum("21");
    albumPage.navigateToPage();
    assertTrue(albumPage.isAt());
}
Also used : AlbumPage(com.iluwatar.pageobject.pages.AlbumPage) Test(org.junit.jupiter.api.Test)

Example 24 with Test

use of org.junit.jupiter.api.Test in project java-design-patterns by iluwatar.

the class AlbumPageTest method testCancelChanges.

@Test
public void testCancelChanges() {
    AlbumListPage albumListPage = albumPage.cancelChanges();
    albumListPage.navigateToPage();
    assertTrue(albumListPage.isAt());
}
Also used : AlbumListPage(com.iluwatar.pageobject.pages.AlbumListPage) Test(org.junit.jupiter.api.Test)

Example 25 with Test

use of org.junit.jupiter.api.Test in project java-design-patterns by iluwatar.

the class LoginPageTest method testLogin.

@Test
public void testLogin() {
    AlbumListPage albumListPage = loginPage.enterUsername("admin").enterPassword("password").login();
    albumListPage.navigateToPage();
    assertTrue(albumListPage.isAt());
}
Also used : AlbumListPage(com.iluwatar.pageobject.pages.AlbumListPage) 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