Search in sources :

Example 11 with World

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);
}
Also used : World(mudmap2.backend.World) Test(org.junit.Test)

Example 12 with World

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());
}
Also used : World(mudmap2.backend.World) Test(org.junit.Test)

Example 13 with World

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);
}
Also used : World(mudmap2.backend.World) Test(org.junit.Test)

Example 14 with World

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());
}
Also used : World(mudmap2.backend.World) Test(org.junit.Test)

Example 15 with World

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());
}
Also used : World(mudmap2.backend.World) Test(org.junit.Test)

Aggregations

World (mudmap2.backend.World)31 Test (org.junit.Test)27 IOException (java.io.IOException)11 FileNotFoundException (java.io.FileNotFoundException)9 Place (mudmap2.backend.Place)9 File (java.io.File)7 WorldFileDefault (mudmap2.backend.WorldFileReader.current.WorldFileDefault)7 Layer (mudmap2.backend.Layer)6 Path (mudmap2.backend.Path)6 WorldCoordinate (mudmap2.backend.WorldCoordinate)6 Color (java.awt.Color)5 HashMap (java.util.HashMap)5 WorldFile (mudmap2.backend.WorldFileReader.WorldFile)5 PlaceGroup (mudmap2.backend.PlaceGroup)4 ActionEvent (java.awt.event.ActionEvent)3 ActionListener (java.awt.event.ActionListener)3 Map (java.util.Map)3 JLabel (javax.swing.JLabel)3 RiskLevel (mudmap2.backend.RiskLevel)3 BorderLayout (java.awt.BorderLayout)2