Search in sources :

Example 1 with King

use of com.iluwatar.objectmother.King 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 2 with King

use of com.iluwatar.objectmother.King in project java-design-patterns by iluwatar.

the class RoyaltyObjectMotherTest method unsuccessfulKingFlirt.

@Test
public void unsuccessfulKingFlirt() {
    King soberUnhappyKing = RoyaltyObjectMother.createSoberUnhappyKing();
    Queen flirtyQueen = RoyaltyObjectMother.createFlirtyQueen();
    soberUnhappyKing.flirt(flirtyQueen);
    assertFalse(soberUnhappyKing.isHappy());
}
Also used : King(com.iluwatar.objectmother.King) Queen(com.iluwatar.objectmother.Queen) Test(org.junit.jupiter.api.Test)

Example 3 with King

use of com.iluwatar.objectmother.King in project java-design-patterns by iluwatar.

the class RoyaltyObjectMotherTest method queenIsBlockingFlirt.

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

Example 4 with King

use of com.iluwatar.objectmother.King in project java-design-patterns by iluwatar.

the class RoyaltyObjectMotherTest method successfullKingFlirt.

@Test
public void successfullKingFlirt() {
    King soberHappyKing = RoyaltyObjectMother.createHappyKing();
    Queen flirtyQueen = RoyaltyObjectMother.createFlirtyQueen();
    soberHappyKing.flirt(flirtyQueen);
    assertTrue(soberHappyKing.isHappy());
}
Also used : King(com.iluwatar.objectmother.King) Queen(com.iluwatar.objectmother.Queen) Test(org.junit.jupiter.api.Test)

Aggregations

King (com.iluwatar.objectmother.King)4 Queen (com.iluwatar.objectmother.Queen)4 Test (org.junit.jupiter.api.Test)4