aboutsummaryrefslogtreecommitdiffstats
path: root/ajde
diff options
context:
space:
mode:
authorwisberg <wisberg>2003-05-05 15:09:33 +0000
committerwisberg <wisberg>2003-05-05 15:09:33 +0000
commit721f2c00b04706d82c8abd0cb292b1dddfea89f1 (patch)
tree8b44470b5488d4a98c9cb843a54d5cc8d808d273 /ajde
parent779e49fb268f8e90442e5260289d882cfc945e08 (diff)
downloadaspectj-721f2c00b04706d82c8abd0cb292b1dddfea89f1.tar.gz
aspectj-721f2c00b04706d82c8abd0cb292b1dddfea89f1.zip
fix test - NPE Guard, canonicalize file input
Diffstat (limited to 'ajde')
-rw-r--r--ajde/testsrc/org/aspectj/ajde/StructureModelTest.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/ajde/testsrc/org/aspectj/ajde/StructureModelTest.java b/ajde/testsrc/org/aspectj/ajde/StructureModelTest.java
index 625990e3a..fedc151be 100644
--- a/ajde/testsrc/org/aspectj/ajde/StructureModelTest.java
+++ b/ajde/testsrc/org/aspectj/ajde/StructureModelTest.java
@@ -113,10 +113,11 @@ public class StructureModelTest extends AjdeTestCase {
* @todo add negative test to make sure things that aren't runnable aren't annotated
*/
public void testMainClassNodeInfo() throws IOException {
- assertTrue("root exists", Ajde.getDefault().getStructureModelManager().getStructureModel().getRoot() != null);
- File testFile = createFile("figures-coverage/figures/Main.java");
- StructureNode node = Ajde.getDefault().getStructureModelManager().getStructureModel().findNodeForSourceLine(
- testFile.getAbsolutePath(), 11);
+ StructureModel model = Ajde.getDefault().getStructureModelManager().getStructureModel();
+ assertTrue("model exists", model != null);
+ assertTrue("root exists", model.getRoot() != null);
+ File testFile = createFile("figures-coverage/figures/Main.java");
+ StructureNode node = model.findNodeForSourceLine(testFile.getCanonicalPath(), 11);
assertTrue("find result", node != null);