Search in sources :

Example 1 with Rasterbar

use of com.b3dgs.lionengine.graphic.engine.Rasterbar in project lionengine by b3dgs.

the class WorldTest method prepare.

/**
 * Prepare test.
 */
@BeforeEach
public void prepare() {
    services.add(new Context() {

        @Override
        public int getX() {
            return 0;
        }

        @Override
        public int getY() {
            return 0;
        }

        @Override
        public int getWidth() {
            return 0;
        }

        @Override
        public int getHeight() {
            return 0;
        }

        @Override
        public <T extends InputDevice> T getInputDevice(Class<T> type) {
            return null;
        }

        @Override
        public Config getConfig() {
            return config;
        }
    });
    services.add(new SourceResolutionProvider() {

        @Override
        public int getWidth() {
            return output.getWidth();
        }

        @Override
        public int getHeight() {
            return output.getHeight();
        }

        @Override
        public int getRate() {
            return output.getRate();
        }
    });
    services.add(new Sequencer() {

        @Override
        public void end(Class<? extends Sequencable> nextSequenceClass, Object... arguments) {
        // Mock
        }

        @Override
        public void end() {
        // Mock
        }

        @Override
        public void load(Class<? extends Sequencable> nextSequenceClass, Object... arguments) {
        // Mock
        }

        @Override
        public void setSystemCursorVisible(boolean visible) {
        // Mock
        }
    });
    services.add(new Rasterbar() {

        @Override
        public void setRasterbarY(int y1, int y2) {
        // Mock
        }

        @Override
        public void setRasterbarOffset(int offsetY, int factorY) {
        // Mock
        }

        @Override
        public void renderRasterbar() {
        // Mock
        }

        @Override
        public void clearRasterbarColor() {
        // Mock
        }

        @Override
        public void addRasterbarColor(ImageBuffer buffer) {
        // Mock
        }
    });
}
Also used : Context(com.b3dgs.lionengine.Context) Sequencer(com.b3dgs.lionengine.graphic.engine.Sequencer) ImageBuffer(com.b3dgs.lionengine.graphic.ImageBuffer) Config(com.b3dgs.lionengine.Config) SourceResolutionProvider(com.b3dgs.lionengine.graphic.engine.SourceResolutionProvider) Rasterbar(com.b3dgs.lionengine.graphic.engine.Rasterbar) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

Config (com.b3dgs.lionengine.Config)1 Context (com.b3dgs.lionengine.Context)1 ImageBuffer (com.b3dgs.lionengine.graphic.ImageBuffer)1 Rasterbar (com.b3dgs.lionengine.graphic.engine.Rasterbar)1 Sequencer (com.b3dgs.lionengine.graphic.engine.Sequencer)1 SourceResolutionProvider (com.b3dgs.lionengine.graphic.engine.SourceResolutionProvider)1 BeforeEach (org.junit.jupiter.api.BeforeEach)1