Search in sources :

Example 1 with MockContext

use of org.terasology.engine.context.internal.MockContext in project Terasology by MovingBlocks.

the class InputConfig method reset.

public void reset() {
    Config defaultConfig = new Config(new MockContext());
    defaultConfig.loadDefaults();
    InputConfig defaultInputConfig = defaultConfig.getInput();
    setMouseSensitivity(defaultInputConfig.mouseSensitivity);
    setMouseYAxisInverted(defaultInputConfig.mouseYAxisInverted);
}
Also used : MockContext(org.terasology.engine.context.internal.MockContext)

Example 2 with MockContext

use of org.terasology.engine.context.internal.MockContext in project Terasology by MovingBlocks.

the class IntMathTest method setUpClass.

@BeforeAll
public static void setUpClass() throws Exception {
    Config config = new Config(new MockContext());
    CoreRegistry.setContext(new ContextImpl());
    CoreRegistry.put(Config.class, config);
}
Also used : MockContext(org.terasology.engine.context.internal.MockContext) Config(org.terasology.engine.config.Config) ContextImpl(org.terasology.engine.context.internal.ContextImpl) BeforeAll(org.junit.jupiter.api.BeforeAll)

Aggregations

MockContext (org.terasology.engine.context.internal.MockContext)2 BeforeAll (org.junit.jupiter.api.BeforeAll)1 Config (org.terasology.engine.config.Config)1 ContextImpl (org.terasology.engine.context.internal.ContextImpl)1