|
Gridarta Editor
|
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... | |
Regression tests for MapMenuLoader.
Definition at line 45 of file MapMenuPreferencesTest.java.
|
staticprivate |
Compares two TreeNode instances.
Fails the test case if the nodes are not equal.
| treeNode1 | the first tree node instance |
| treeNode2 | the 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:
|
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:| void net.sf.gridarta.gui.mapmenu.MapMenuPreferencesTest.test1 | ( | ) | throws IOException |
Checks that saving and re-loading entries works as expected.
| IOException | if the test fails |
Definition at line 52 of file MapMenuPreferencesTest.java.
References net.sf.gridarta.gui.mapmenu.MapMenuLoader.Type.DIR, net.sf.gridarta.gui.mapmenu.MapMenuEntryMap.getMapFile(), net.sf.gridarta.model.io.PathManager.getMapFile(), net.sf.gridarta.gui.mapmenu.MapMenuEntry.getTitle(), net.sf.gridarta.gui.mapmenu.MapMenuLoader.loadEntry(), net.sf.gridarta.gui.mapmenu.MapMenuLoader.loadNumEntries(), net.sf.gridarta.gui.mapmenu.MapMenuLoader.Type.MAP, net.sf.gridarta.gui.mapmenu.MapMenuLoader.removeEntry(), net.sf.gridarta.gui.mapmenu.MapMenuLoader.saveEntry(), and net.sf.gridarta.gui.mapmenu.MapMenuLoader.saveNumEntries().
Here is the call graph for this function:| void net.sf.gridarta.gui.mapmenu.MapMenuPreferencesTest.test2 | ( | ) | throws BackingStoreException |
Checks that loading a MapMenu instance works as expected.
| BackingStoreException | if 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:| void net.sf.gridarta.gui.mapmenu.MapMenuPreferencesTest.test3 | ( | ) |
Checks that saving and re-loading a MapMenu having directories with the same name works.
Definition at line 140 of file MapMenuPreferencesTest.java.
References net.sf.gridarta.gui.mapmenu.MapMenu.addMapMenuEntry(), net.sf.gridarta.gui.mapmenu.MapMenuPreferencesTest.compareTrees(), net.sf.gridarta.model.io.PathManager.getMapFile(), 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.MapMenuEntry.setTitle().
Here is the call graph for this function: