com.hp.hpl.jena.xmloutput
Class testWriterAndReader

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by com.hp.hpl.jena.test.JenaTestBase
              extended by com.hp.hpl.jena.graph.test.GraphTestBase
                  extended by com.hp.hpl.jena.rdf.model.test.ModelTestBase
                      extended by com.hp.hpl.jena.xmloutput.testWriterAndReader
All Implemented Interfaces:
RDFErrorHandler, junit.framework.Test

public class testWriterAndReader
extends com.hp.hpl.jena.rdf.model.test.ModelTestBase
implements RDFErrorHandler

This will test any Writer and Reader pair. It writes out a random model, and reads it back in. The test fails if the models are not 'the same'. Quite what 'the same' means is debatable.

Version:
Release='$Name: Jena-2_6_4 $' Revision='$Revision: 1.1 $' Date='$Date: 2009/07/04 16:41:34 $'
Author:
jjc

Nested Class Summary
static class testWriterAndReader.TestXMLFeatures_XML
           
static class testWriterAndReader.TestXMLFeatures_XML_ABBREV
           
 
Method Summary
 void doTest(java.lang.String[] propNames, java.lang.Object[] propVals)
           
 void error(java.lang.Exception e)
          report an error
 void fatalError(java.lang.Exception e)
          report a catastrophic error.
static junit.framework.TestSuite repeatedAbbrevSuite()
           
 void test(java.lang.String rwLang, int seed, int variationMax, java.lang.String[] wopName, java.lang.Object[] wopVal)
           
 void testLongId()
           
 void testOptions()
           
 void testRandom()
           
 java.lang.String toString()
           
 void warning(java.lang.Exception e)
          report a warning
 
Methods inherited from class com.hp.hpl.jena.rdf.model.test.ModelTestBase
assertIsoModels, assertIsoModels, createMemModel, createModel, literal, modelAdd, modelWithStatements, modelWithStatements, property, property, rdfNode, rdfNode, resource, resource, resources, resourceSet, statement, statement, statements
 
Methods inherited from class com.hp.hpl.jena.graph.test.GraphTestBase
arrayToSet, assertContains, assertContainsAll, assertEqualsTemplate, assertIsomorphic, assertIsomorphic, assertOmits, assertOmitsAll, contains, getGraph, graphAdd, graphWith, iteratorToList, iteratorToSet, newGraph, nice, node, nodeArray, nodeList, nodeSet, testContains, testContains, testContains, testContains, testOmits, testOmits, testOmits, testOmits, triple, triple, tripleArray, tripleSet
 
Methods inherited from class com.hp.hpl.jena.test.JenaTestBase
append, assertDiffer, assertDiffer, assertHasParent, assertInstanceOf, getConstructor, hasAsParent, isPublicTestMethod, isTestMethod, listOfOne, listOfStrings, listToSet, pass, setOfOne, setOfStrings, testToSilenceJunitComplaintsAboutNoTestMethods
 
Methods inherited from class junit.framework.TestCase
countTestCases, getName, run, run, runBare, setName
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class junit.framework.TestCase

repeatedAbbrevSuite

public static junit.framework.TestSuite repeatedAbbrevSuite()

testRandom

public void testRandom()
                throws java.io.IOException
Throws:
java.io.IOException

testLongId

public void testLongId()
                throws java.io.IOException
Throws:
java.io.IOException

testOptions

public void testOptions()
                 throws java.io.IOException
Throws:
java.io.IOException

doTest

public void doTest(java.lang.String[] propNames,
                   java.lang.Object[] propVals)
            throws java.io.IOException
Throws:
java.io.IOException

test

public void test(java.lang.String rwLang,
                 int seed,
                 int variationMax,
                 java.lang.String[] wopName,
                 java.lang.Object[] wopVal)
          throws java.io.IOException
Parameters:
rwLang - Use Writer for this lang
seed - A seed for the random number generator
variationMax - Number of random variations
wopName - Property names to set on Writer
wopVal - Property values to set on Writer
Throws:
java.io.IOException

warning

public void warning(java.lang.Exception e)
report a warning

Specified by:
warning in interface RDFErrorHandler
Parameters:
e - an exception representing the error

error

public void error(java.lang.Exception e)
Description copied from interface: RDFErrorHandler
report an error

Specified by:
error in interface RDFErrorHandler
Parameters:
e - an exception representing the error

fatalError

public void fatalError(java.lang.Exception e)
Description copied from interface: RDFErrorHandler
report a catastrophic error. Must not return.

Specified by:
fatalError in interface RDFErrorHandler
Parameters:
e - an exception representing the error


Copyright ? 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Hewlett-Packard Development Company, LP