Search in sources :

Example 16 with FactoryGraphicMock

use of com.b3dgs.lionengine.graphic.FactoryGraphicMock in project lionengine by b3dgs.

the class SpriteFontTest method beforeTests.

/**
 * Prepare tests.
 */
@BeforeAll
public static void beforeTests() {
    Medias.setFactoryMedia(new FactoryMediaDefault());
    Medias.setLoadFromJar(SpriteFontTest.class);
    Graphics.setFactoryGraphic(new FactoryGraphicMock());
    media = Medias.create("image.png");
    font = Medias.create("fontdata.xml");
}
Also used : FactoryMediaDefault(com.b3dgs.lionengine.FactoryMediaDefault) FactoryGraphicMock(com.b3dgs.lionengine.graphic.FactoryGraphicMock) BeforeAll(org.junit.jupiter.api.BeforeAll)

Example 17 with FactoryGraphicMock

use of com.b3dgs.lionengine.graphic.FactoryGraphicMock in project lionengine by b3dgs.

the class SpriteTest method beforeTests.

/**
 * Prepare tests.
 */
@BeforeAll
public static void beforeTests() {
    Graphics.setFactoryGraphic(new FactoryGraphicMock());
    Medias.setLoadFromJar(SpriteTest.class);
}
Also used : FactoryGraphicMock(com.b3dgs.lionengine.graphic.FactoryGraphicMock) BeforeAll(org.junit.jupiter.api.BeforeAll)

Example 18 with FactoryGraphicMock

use of com.b3dgs.lionengine.graphic.FactoryGraphicMock in project lionengine by b3dgs.

the class ImageTest method beforeTests.

/**
 * Prepare tests.
 */
@BeforeAll
public static void beforeTests() {
    Graphics.setFactoryGraphic(new FactoryGraphicMock());
    Medias.setLoadFromJar(ImageTest.class);
    media = Medias.create("image.png");
}
Also used : FactoryGraphicMock(com.b3dgs.lionengine.graphic.FactoryGraphicMock) BeforeAll(org.junit.jupiter.api.BeforeAll)

Example 19 with FactoryGraphicMock

use of com.b3dgs.lionengine.graphic.FactoryGraphicMock in project lionengine by b3dgs.

the class ParallaxTest method beforeTests.

/**
 * Prepare tests.
 */
@BeforeAll
public static void beforeTests() {
    Graphics.setFactoryGraphic(new FactoryGraphicMock());
    Medias.setLoadFromJar(ParallaxTest.class);
}
Also used : FactoryGraphicMock(com.b3dgs.lionengine.graphic.FactoryGraphicMock) BeforeAll(org.junit.jupiter.api.BeforeAll)

Example 20 with FactoryGraphicMock

use of com.b3dgs.lionengine.graphic.FactoryGraphicMock in project lionengine by b3dgs.

the class FactoryTest method beforeAll.

/**
 * Start engine.
 */
@BeforeAll
static void beforeAll() {
    Engine.start(new EngineMock(FactoryTest.class.getSimpleName(), Version.DEFAULT));
    Medias.setResourcesDirectory(System.getProperty("java.io.tmpdir"));
    Medias.setLoadFromJar(FactoryTest.class);
    Graphics.setFactoryGraphic(new FactoryGraphicMock());
}
Also used : FactoryGraphicMock(com.b3dgs.lionengine.graphic.FactoryGraphicMock) EngineMock(com.b3dgs.lionengine.EngineMock) BeforeAll(org.junit.jupiter.api.BeforeAll)

Aggregations

FactoryGraphicMock (com.b3dgs.lionengine.graphic.FactoryGraphicMock)61 BeforeAll (org.junit.jupiter.api.BeforeAll)35 BeforeClass (org.junit.BeforeClass)24 EngineMock (com.b3dgs.lionengine.EngineMock)11 FactoryMediaDefault (com.b3dgs.lionengine.FactoryMediaDefault)3 Config (com.b3dgs.lionengine.Config)2 Screen (com.b3dgs.lionengine.graphic.Screen)2 Semaphore (java.util.concurrent.Semaphore)2 AtomicReference (java.util.concurrent.atomic.AtomicReference)2 Animation (com.b3dgs.lionengine.Animation)1 Xml (com.b3dgs.lionengine.Xml)1 Collision (com.b3dgs.lionengine.game.feature.collidable.Collision)1 Collection (java.util.Collection)1 HashMap (java.util.HashMap)1 Test (org.junit.Test)1 Test (org.junit.jupiter.api.Test)1