Skip to content

Commit

Permalink
First working test, not much to look at.
Browse files Browse the repository at this point in the history
  • Loading branch information
kbrowder committed May 14, 2012
1 parent 3f15878 commit d553a1d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
11 changes: 7 additions & 4 deletions PyJDT/src/main/test/net/kbserve/pyjdt/ModelTest.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
package net.kbserve.pyjdt;

import static org.junit.Assert.fail;
import net.kbserve.pyjdt.properties.models.RootContainer;

import org.eclipse.core.resources.IProject;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.junit.JUnitCore;
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;

Expand All @@ -23,12 +25,13 @@ public static void setUpTestProject2() throws Exception {
TestUtilities.addLibraryContainer(JUnitCore.JUNIT4_CONTAINER_PATH,
project);
TestUtilities.addPyDevNature(project.getProject(), "src");

}

@Test
public void test() {
fail("Not yet implemented");
public void testFindsContainer() {
IProject project = TestUtilities.getProject("TestProject2");
RootContainer rc = RootContainer.getRoot(project);
Assert.assertNotNull("Could not find the JUnit container",rc.getChild(JUnitCore.JUNIT4_CONTAINER_PATH.toPortableString()));
}

@AfterClass
Expand Down
3 changes: 3 additions & 0 deletions PyJDT/src/main/test/net/kbserve/pyjdt/TestUtilities.java
Original file line number Diff line number Diff line change
Expand Up @@ -177,5 +177,8 @@ public static void deleteAllTestProjects() throws CoreException {
System.out.println("Deleted project named: " + project.getName());
}
}
public static IProject getProject(String name) {
return projects.get(name);
}

}

0 comments on commit d553a1d

Please sign in to comment.