"""
$RCSfile: alltests.py,v $

Run all ZopeXMLMethods unit tests

Author: Ariel Partners LLC <support@arielpartners.com>
Modified by Philipp "philiKON" von Weitershausen <philikon@philikon.de>

$Id: alltests.py,v 1.4 2003/06/16 05:47:54 arielpartners Exp $
"""

__cvstag__  = '$Name:  $'[6:-2]
__date__    = '$Date: 2003/06/16 05:47:54 $'[6:-2]
__version__ = '$Revision: 1.4 $'[10:-2]

import os, sys
if __name__ == '__main__':
    execfile(os.path.join(sys.path[0], 'framework.py'))

# Load fixture
from Testing import ZopeTestCase

# Import the TestCase from each module
from TestCacheManager import CacheManagerTestCase
from TestXSLTMethod import XSLTMethodTestCase
from TestXPathMethod import XPathMethodTestCase
from TestDTDValidateMethod import DTDValidateMethodTestCase
from TestXSLTProcessor import XSLTProcessorTestCase
from TestXPathProcessor import XPathProcessorTestCase
from TestDTDValidator import DTDValidatorTestCase

# Add the TestCase class to this list
unitTests = (
    CacheManagerTestCase,
    XSLTMethodTestCase,
    XPathMethodTestCase,
    DTDValidateMethodTestCase,
    XSLTProcessorTestCase,
    XPathProcessorTestCase,
    DTDValidatorTestCase,
    )

################################################################
# The rest is boilerplate: don't touch
################################################################
import unittest, os

masterSuite = unittest.TestSuite(map(lambda x: unittest.makeSuite(x, 'test'),
                                     unitTests))

runner = unittest.TextTestRunner()

if __name__ == '__main__':
    from Products.ZopeXMLMethods.processors.ProcessorRegistry import ProcessorRegistry
    from Products.ZopeXMLMethods.processors.interfaces import IXSLTProcessor, \
         IXPathProcessor, IDTDValidator
    
    # Specify which processor to use
    #ProcessorRegistry.CandidateProcessors = ( 'FourSuiteProcessor' )
        
    # report which processor we are using
    print "Using XSLT processor: ", ProcessorRegistry.defaultName(IXSLTProcessor)
    print "Using XPath processor:", ProcessorRegistry.defaultName(IXPathProcessor)
    print "Using DTD validator:  ", ProcessorRegistry.defaultName(IDTDValidator)    
    
    runner.run(masterSuite)
