Sharpen lobby artwork and add private togglable JARVIS scoreboard
This commit is contained in:
parent
9e21286756
commit
eea7af7a2e
1 changed files with 1758 additions and 67 deletions
|
|
@ -0,0 +1,11 @@
|
|||
package com.dunerealms.gui;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
class DragonControllerTest {
|
||||
private static class EndDragonFight {}
|
||||
private static class WorldHandle {private EndDragonFight dragonFight=new EndDragonFight();private final String unrelated="preserved";}
|
||||
@Test void detachOnlyControllerAndRestoreWithoutOverwritingNewerState()throws Exception{
|
||||
WorldHandle world=new WorldHandle();Object original=world.dragonFight;var change=DragonController.detach(world);assertNull(world.dragonFight);assertEquals("preserved",world.unrelated);change.restore();assertSame(original,world.dragonFight);
|
||||
var second=DragonController.detach(world);world.dragonFight=new EndDragonFight();Object newer=world.dragonFight;second.restore();assertSame(newer,world.dragonFight);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue

Staff