1
0
mirror of https://github.com/Anuken/Mindustry.git synced 2024-11-10 06:36:14 +03:00

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

View File

@ -85,6 +85,8 @@ public class ApplicationTests{
}catch(Throwable r){
fail(r);
}
Log.info("init app");
}
@BeforeEach

View File

@ -25,18 +25,26 @@ public class PowerTestFixture{
@BeforeAll
static void initializeDependencies(){
Log.info("init power test fixture");
headless = true;
Core.graphics = new FakeGraphics();
Core.files = new MockFiles();
Vars.content = new ContentLoader(){
@Override
public void handleMappableContent(MappableContent content){
}
};
boolean make = content == null;
if(make){
Vars.content = new ContentLoader(){
@Override
public void handleMappableContent(MappableContent content){
}
};
}
Vars.state = new GameState();
Vars.tree = new FileTree();
content.createBaseContent();
if(make){
content.createBaseContent();
}
Log.useColors = false;
Time.setDeltaProvider(() -> 0.5f);
}