Testing tests

This commit is contained in:
Anuken
2020-12-04 12:16:47 -05:00
parent 6583cc0b5d
commit 8b8d990852
2 changed files with 16 additions and 6 deletions
@@ -85,6 +85,8 @@ public class ApplicationTests{
}catch(Throwable r){ }catch(Throwable r){
fail(r); fail(r);
} }
Log.info("init app");
} }
@BeforeEach @BeforeEach
@@ -25,18 +25,26 @@ public class PowerTestFixture{
@BeforeAll @BeforeAll
static void initializeDependencies(){ static void initializeDependencies(){
Log.info("init power test fixture");
headless = true; headless = true;
Core.graphics = new FakeGraphics(); Core.graphics = new FakeGraphics();
Core.files = new MockFiles(); Core.files = new MockFiles();
boolean make = content == null;
if(make){
Vars.content = new ContentLoader(){ Vars.content = new ContentLoader(){
@Override @Override
public void handleMappableContent(MappableContent content){ public void handleMappableContent(MappableContent content){
} }
}; };
}
Vars.state = new GameState(); Vars.state = new GameState();
Vars.tree = new FileTree(); Vars.tree = new FileTree();
if(make){
content.createBaseContent(); content.createBaseContent();
}
Log.useColors = false; Log.useColors = false;
Time.setDeltaProvider(() -> 0.5f); Time.setDeltaProvider(() -> 0.5f);
} }