use of mudmap2.backend.World in project mudmap2 by Neop.
the class WorldPanelTest method testMoveCursor.
/**
* Test of moveCursor method, of class WorldPanel.
*/
@Test
public void testMoveCursor() {
System.out.println("moveCursor");
int dx = 9;
int dy = -4;
World world = new World();
WorldPanel instance = new WorldPanel(null, world, false);
instance.setCursor(4, 6);
instance.moveCursor(4 + dx, 6 + dy);
}
use of mudmap2.backend.World in project mudmap2 by Neop.
the class WorldPanelTest method testIsFocusForced.
/**
* Test of isFocusForced / setFocusForced method, of class WorldPanel.
*/
@Test
public void testIsFocusForced() {
System.out.println("isFocusForced");
WorldPanel instance = new WorldPanel(null, new World(), false);
assertFalse(instance.isFocusForced());
instance.setFocusForced(true);
assertTrue(instance.isFocusForced());
instance.setFocusForced(false);
assertFalse(instance.isFocusForced());
}
use of mudmap2.backend.World in project mudmap2 by Neop.
the class WorldPanelTest method testIsCursorForced.
/**
* Test of is/setCursorForced method, of class WorldPanel.
*/
@Test
public void testIsCursorForced() {
System.out.println("isCursorForced");
World world = new World();
WorldPanel instance = new WorldPanel(null, world, false);
boolean result = instance.isCursorForced();
assertFalse(result);
instance.setCursorForced(true);
result = instance.isCursorForced();
assertTrue(result);
instance.setCursorForced(false);
result = instance.isCursorForced();
assertFalse(result);
}
use of mudmap2.backend.World in project mudmap2 by Neop.
the class WorldPanelTest method testGetMappainter.
/**
* Test of getMappainter method, of class WorldPanel.
*/
@Test
public void testGetMappainter() {
System.out.println("getMappainter");
WorldPanel instance = new WorldPanel(null, new World(), false);
assertNotNull(instance.getMappainter());
}
use of mudmap2.backend.World in project mudmap2 by Neop.
the class WorldPanelTest method testTileSizeIncrement.
/**
* Test of tileSizeIncrement method, of class WorldPanel.
*/
@Test
public void testTileSizeIncrement() {
System.out.println("tileSizeIncrement");
World world = new World();
WorldPanel instance = new WorldPanel(null, world, false);
double ts = 57.5;
instance.setTileSize(ts);
instance.tileSizeIncrement();
assertTrue(ts < instance.getTileSize());
}
Aggregations