Last active
August 29, 2015 14:19
-
-
Save kinow/a7c1f3af857830d4dffc to your computer and use it in GitHub Desktop.
Jena tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.hp.hpl.jena.rdf.model.test; | |
import junit.framework.TestCase; | |
import junit.framework.TestSuite; | |
public class ASimpleTestCase extends TestCase { | |
public ASimpleTestCase() { | |
super("testAnything"); | |
} | |
public static TestSuite suite() { | |
ASimpleTestCase test = new ASimpleTestCase(); | |
TestSuite ts = new TestSuite(); | |
ts.addTest(test); | |
return ts; | |
} | |
public void testAnything() { | |
System.out.println("Hello!"); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.hp.hpl.jena.rdf.model.test; | |
import org.junit.Test; | |
import junit.framework.TestCase; | |
import junit.framework.TestSuite; | |
public class ASimpleTestCase extends TestCase { | |
public ASimpleTestCase() { | |
super("testAnything"); | |
} | |
public static TestSuite suite() { | |
ASimpleTestCase test = new ASimpleTestCase(); | |
TestSuite ts = new TestSuite(); | |
ts.addTest(test); | |
return ts; | |
} | |
// Step 1 add JUnit4 annotation | |
@Test | |
public void testAnything() { | |
System.out.println("Hello!"); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.hp.hpl.jena.rdf.model.test; | |
import org.junit.Test; | |
// Step 2 remove imports and test suite | |
public class ASimpleTestCase { | |
// Step 1 add JUnit4 annotation | |
@Test | |
public void testAnything() { | |
System.out.println("Hello!"); | |
} | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.hp.hpl.jena.graph.test; | |
import org.junit.runner.RunWith; | |
import org.junit.runners.Suite; | |
import org.junit.runners.Suite.SuiteClasses; | |
import com.hp.hpl.jena.rdf.model.test.ASimpleTestCase; | |
// Step 3 move test suite to an external file | |
@RunWith(Suite.class) | |
@SuiteClasses(ASimpleTestCase.class) | |
public class TS_ASimpleTestCase { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment