test: fix ExampleInterface import
import org.terasology.engine.core.module.ModuleManager;
import org.terasology.engine.entitySystem.Component;
import org.terasology.engine.testUtil.ModuleManagerFactory;
-import org.terasology.engine.unittest.ExampleInterface;
+import org.terasology.gestalt.module.ModuleEnvironment;
import org.terasology.reflection.ModuleTypeRegistry;
import org.terasology.reflection.TypeRegistry;
+import org.terasology.unittest.ExampleInterface;
import static org.terasology.engine.testUtil.Assertions.assertNotEmpty;
+@SuppressWarnings("FieldCanBeLocal")
public class TestModuleEnvironmentSandbox {
private ModuleEnvironmentSandbox sandbox;
private TypeRegistry typeRegistry;
+ private ModuleManager moduleManager;
+ private ModuleEnvironment environment;
@BeforeEach
protected void provideSandbox() throws Exception {
- ModuleManager moduleManager = ModuleManagerFactory.create();
+ moduleManager = ModuleManagerFactory.create();
+ environment = moduleManager.getEnvironment();
+
// TODO: make unit test more focused by not relying on complex ModuleManager interactions
- typeRegistry = new ModuleTypeRegistry(moduleManager.getEnvironment());
+ typeRegistry = new ModuleTypeRegistry(environment);
sandbox = new ModuleEnvironmentSandbox(moduleManager, typeRegistry);
+
+ // module = environment.get(new Name("unittest"));
}
@Test
