Gridarta Editor
net.sf.gridarta.gui.mapmenu.MapMenuPreferencesTest Class Reference

Regression tests for MapMenuLoader. More...

+ Collaboration diagram for net.sf.gridarta.gui.mapmenu.MapMenuPreferencesTest:

Public Member Functions

void test1 () throws IOException
 Checks that saving and re-loading entries works as expected. More...
 
void test2 () throws BackingStoreException
 Checks that loading a MapMenu instance works as expected. More...
 
void test3 ()
 Checks that saving and re-loading a MapMenu having directories with the same name works. More...
 

Static Public Member Functions

static void setUp ()
 Initializes the test case. More...
 

Static Private Member Functions

static void compareTrees (@NotNull final TreeNode treeNode1, @NotNull final TreeNode treeNode2)
 Compares two TreeNode instances. More...
 

Detailed Description

Regression tests for MapMenuLoader.

Author
Andreas Kirschbaum

Definition at line 45 of file MapMenuPreferencesTest.java.

Member Function Documentation

◆ compareTrees()

static void net.sf.gridarta.gui.mapmenu.MapMenuPreferencesTest.compareTrees ( @NotNull final TreeNode  treeNode1,
@NotNull final TreeNode  treeNode2 
)
staticprivate

Compares two TreeNode instances.

Fails the test case if the nodes are not equal.

Parameters
treeNode1the first tree node instance
treeNode2the second tree node instance

Definition at line 166 of file MapMenuPreferencesTest.java.

References net.sf.gridarta.gui.mapmenu.MapMenuEntryMap.getMapFile(), net.sf.gridarta.gui.mapmenu.MapMenuEntry.getTitle(), and net.sf.gridarta.gui.mapmenu.MapMenuEntry.visit().

Referenced by net.sf.gridarta.gui.mapmenu.MapMenuPreferencesTest.test2(), and net.sf.gridarta.gui.mapmenu.MapMenuPreferencesTest.test3().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setUp()

static void net.sf.gridarta.gui.mapmenu.MapMenuPreferencesTest.setUp ( )
static

Initializes the test case.

Definition at line 198 of file MapMenuPreferencesTest.java.

References net.sf.gridarta.preferences.FilePreferencesFactory.initialize().

+ Here is the call graph for this function:

◆ test1()

◆ test2()

void net.sf.gridarta.gui.mapmenu.MapMenuPreferencesTest.test2 ( ) throws BackingStoreException

Checks that loading a MapMenu instance works as expected.

Exceptions
BackingStoreExceptionif the test fails

Definition at line 102 of file MapMenuPreferencesTest.java.

References net.sf.gridarta.gui.mapmenu.MapMenuPreferencesTest.compareTrees(), net.sf.gridarta.gui.mapmenu.MapMenu.getRoot(), net.sf.gridarta.gui.mapmenu.MapMenu.load(), net.sf.gridarta.gui.mapmenu.MapMenu.saveAlways(), and net.sf.gridarta.gui.mapmenu.MapMenu.size().

+ Here is the call graph for this function:

◆ test3()


The documentation for this class was generated from the following file: