org.netbeans.modules.jellytools.platform/3 3.13

org.netbeans.jellytools
Class TestBundleKeys

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.netbeans.junit.NbTestCase
              extended by org.netbeans.jellytools.TestBundleKeys
All Implemented Interfaces:
junit.framework.Test, NbTest

public abstract class TestBundleKeys
extends NbTestCase

Base class for testing resurce bundle keys used in a particular jellytools cluster. Descendants need to implement the getPropertiesName() and getDescendantClass() methods and also add the suite() and main() methods.


Constructor Summary
TestBundleKeys(String isBundleName)
           
 
Method Summary
protected abstract  ClassLoader getDescendantClassLoader()
          Descendants need to implement this method to return their classloader.
protected static Properties getProperties(ClassLoader irClassLoader, String isPropertiesName)
           
protected abstract  String getPropertiesName()
          Descendants implement this method to return a proper name.
protected static junit.framework.Test prepareSuite(Class irClass, String isPropertiesName)
          Does common things needed in the suite() method that descendants need to create.
protected  void runTest()
          Performs the test itself.
 
Methods inherited from class org.netbeans.junit.NbTestCase
assertFile, assertFile, assertFile, assertFile, assertFile, assertFile, assertFile, assertFile, assertFile, assertFile, assertGC, assertGC, assertSize, assertSize, assertSize, assertSize, canRun, clearWorkDir, compareReferenceFiles, compareReferenceFiles, convertNBFSURL, failByBug, failByBug, getDataDir, getExpectedFail, getGoldenFile, getGoldenFile, getLog, getLog, getRef, getTestNumber, getWorkDir, getWorkDirPath, log, log, logLevel, logRoot, ref, run, runBare, runInEQ, setFilter, timeOut
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, setName, setUp, tearDown, toString
 
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, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface junit.framework.Test
countTestCases
 

Constructor Detail

TestBundleKeys

public TestBundleKeys(String isBundleName)
Method Detail

getPropertiesName

protected abstract String getPropertiesName()
Descendants implement this method to return a proper name. e.g. org/netbeans/jellytools/BundleKeysTest.properties

Returns:
name of the descendants-specific properties file

getDescendantClassLoader

protected abstract ClassLoader getDescendantClassLoader()
Descendants need to implement this method to return their classloader. It is needed to load their specific properties file.

Returns:
descendant class

getProperties

protected static Properties getProperties(ClassLoader irClassLoader,
                                          String isPropertiesName)
                                   throws IOException
Throws:
IOException

runTest

protected void runTest()
                throws Throwable
Performs the test itself.

Overrides:
runTest in class junit.framework.TestCase
Throws:
Throwable

prepareSuite

protected static junit.framework.Test prepareSuite(Class irClass,
                                                   String isPropertiesName)
Does common things needed in the suite() method that descendants need to create.

Parameters:
irClass - descendant class
isPropertiesName - name of the descendants-specific properties file
Returns:
prepared test

org.netbeans.modules.jellytools.platform/3 3.13

Built on May 22 2012.  |  Portions Copyright 1997-2012 Oracle. All rights reserved.