| com.hp.hpl.jena.test.JenaTestBase
All known Subclasses: com.hp.hpl.jena.rdf.model.test.TestAnonID, com.hp.hpl.jena.db.test.TestDriverMap, com.hp.hpl.jena.shared.test.TestJenaException, com.hp.hpl.jena.graph.test.GraphTestBase, com.hp.hpl.jena.regression.TestCaseBasic,
JenaTestBase | public class JenaTestBase extends TestCase (Code) | | A basis for Jena test cases which provides assertFalse and assertDiffer.
Often the logic of the names is clearer than using a negation (well, Chris
thinks so anyway).
author: kers |
Method Summary | |
public static List | append(List L, List R) Answer a fresh list which is the concatenation of L then
R . | public static void | assertDiffer(String title, Object x, Object y) assert that the two objects must be unequal according to .equals(). | public static void | assertDiffer(Object x, Object y) assert that the two objects must be unequal according to .equals(). | public static void | assertHasParent(Class subClass, Class superClass) Fail unless subClass has superClass as a
parent, either a superclass or an implemented (directly or not) interface. | public static void | assertInstanceOf(Class expected, Object x) assert that the object x must be of the class
expected . | public static Constructor | getConstructor(Class c, Class[] args) Answer the constructor of the class c which takes arguments
of the type(s) in args , or null if there
isn't one. | public static boolean | hasAsParent(Class subClass, Class superClass) Answer true iff subClass is the same class as
superClass , if its superclass is superClass ,
or if one of its interfaces hasAsInterface that class. | public static boolean | isPublicTestMethod(Method m) Answer true iff the method m is a public method which fits
the pattern of being a test method, ie, test*() returning void. | public static boolean | isTestMethod(Method m) Answer true iff the method m has a name starting "test",
takes no arguments, and returns void; must catch junit tests, in other
words. | protected static ExtendedIterator | iteratorOfStrings(String s) Answer an iterator over the space-separated substrings of s . | protected static List | listOfOne(Object x) Answer a list containing the single object x . | protected static List | listOfStrings(String s) Answer a List of the substrings of s that are separated
by spaces. | public static Set | listToSet(List L) Answer a Set formed from the elements of the List L . | public static void | pass() Do nothing; a way of notating that a test has succeeded, useful in the
body of a catch-block to silence excessively [un]helpful disgnostics. | protected static Set | setOfOne(Object x) Answer a Set containing the single object x . | protected static Set | setOfStrings(String s) Answer a Set of the substrings of s that are separated
by spaces. | public void | testToSilenceJunitComplaintsAboutNoTestMethods() Does what it says on the can. |
append | public static List append(List L, List R)(Code) | | Answer a fresh list which is the concatenation of L then
R . Neither L nor R is updated.
|
assertDiffer | public static void assertDiffer(String title, Object x, Object y)(Code) | | assert that the two objects must be unequal according to .equals().
Parameters: title - a labelling string for the assertion failure text Parameters: x - an object to test; the subject of a .equals() Parameters: y - the other object; the argument of the .equals() |
assertDiffer | public static void assertDiffer(Object x, Object y)(Code) | | assert that the two objects must be unequal according to .equals().
Parameters: x - an object to test; the subject of a .equals() Parameters: y - the other object; the argument of the .equals() |
assertHasParent | public static void assertHasParent(Class subClass, Class superClass)(Code) | | Fail unless subClass has superClass as a
parent, either a superclass or an implemented (directly or not) interface.
|
assertInstanceOf | public static void assertInstanceOf(Class expected, Object x)(Code) | | assert that the object x must be of the class
expected .
|
getConstructor | public static Constructor getConstructor(Class c, Class[] args)(Code) | | Answer the constructor of the class c which takes arguments
of the type(s) in args , or null if there
isn't one.
|
hasAsParent | public static boolean hasAsParent(Class subClass, Class superClass)(Code) | | Answer true iff subClass is the same class as
superClass , if its superclass is superClass ,
or if one of its interfaces hasAsInterface that class.
|
isPublicTestMethod | public static boolean isPublicTestMethod(Method m)(Code) | | Answer true iff the method m is a public method which fits
the pattern of being a test method, ie, test*() returning void.
|
isTestMethod | public static boolean isTestMethod(Method m)(Code) | | Answer true iff the method m has a name starting "test",
takes no arguments, and returns void; must catch junit tests, in other
words.
|
iteratorOfStrings | protected static ExtendedIterator iteratorOfStrings(String s)(Code) | | Answer an iterator over the space-separated substrings of s .
|
listOfOne | protected static List listOfOne(Object x)(Code) | | Answer a list containing the single object x .
|
listOfStrings | protected static List listOfStrings(String s)(Code) | | Answer a List of the substrings of s that are separated
by spaces.
|
listToSet | public static Set listToSet(List L)(Code) | | Answer a Set formed from the elements of the List L .
|
pass | public static void pass()(Code) | | Do nothing; a way of notating that a test has succeeded, useful in the
body of a catch-block to silence excessively [un]helpful disgnostics.
|
setOfOne | protected static Set setOfOne(Object x)(Code) | | Answer a Set containing the single object x .
|
setOfStrings | protected static Set setOfStrings(String s)(Code) | | Answer a Set of the substrings of s that are separated
by spaces.
|
testToSilenceJunitComplaintsAboutNoTestMethods | public void testToSilenceJunitComplaintsAboutNoTestMethods()(Code) | | Does what it says on the can.
|
|
|