use of org.terasology.engine.context.internal.ContextImpl in project Terasology by MovingBlocks.
the class WorldGeneratorManagerTest method provideContext.
@BeforeEach
void provideContext() throws Exception {
context = new ContextImpl();
context.put(ModuleManager.class, ModuleManagerFactory.create());
}
use of org.terasology.engine.context.internal.ContextImpl 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);
}
use of org.terasology.engine.context.internal.ContextImpl in project Terasology by MovingBlocks.
the class InputSystemTests method setUp.
@BeforeEach
public void setUp() {
Context context = new ContextImpl();
setUpLocalPlayer(context);
setUpDisplayDevice(context);
setUpBindsManager(context);
setUpTargetSystem(context);
context.put(Time.class, new TimeSystem());
inputSystem = new InputSystem();
InjectionHelper.inject(inputSystem, context);
testKeyboard = new TestKeyboard();
inputSystem.setKeyboardDevice(testKeyboard);
clientEntityKeyEvents = new ArrayList<>();
characterEntityKeyEvents = new ArrayList<>();
}
use of org.terasology.engine.context.internal.ContextImpl in project Terasology by MovingBlocks.
the class Environment method reset.
protected void reset(Set<Name> moduleNames) throws Exception {
this.context = new ContextImpl();
RecordAndReplayCurrentStatus recordAndReplayCurrentStatus = new RecordAndReplayCurrentStatus();
context.put(RecordAndReplayCurrentStatus.class, recordAndReplayCurrentStatus);
CoreRegistry.setContext(context);
setupPathManager();
Bullet.init(true, false);
setupConfig();
setupModuleManager(moduleNames);
setupDisplay();
setupAudio();
AssetManager assetManager = setupAssetManager();
setupBlockManager(assetManager);
setupExtraDataManager(context);
setupCollisionManager();
setupNetwork();
setupEntitySystem();
setupStorageManager();
setupComponentManager();
setupWorldProvider();
setupCelestialSystem();
loadPrefabs();
}
use of org.terasology.engine.context.internal.ContextImpl in project Terasology by MovingBlocks.
the class BindsSubsystemTest method setUp.
@BeforeEach
public void setUp() {
bindsSubsystem = new BindsSubsystem();
bindsConfiguration = new BindsConfigAdapter(new BindsConfig());
context = new ContextImpl();
context.put(BindsConfiguration.class, bindsConfiguration);
bindsSubsystem.preInitialise(context);
setUpMockModuleEnvironment();
}
Aggregations