Methods Summary |
---|
public static void | main(java.lang.String[] args)
junit.textui.TestRunner.run(suite());
|
private void | nyi()
fail("Not yet implemented"); //NOI18N
|
protected void | setUp()Initialize; allocate any resources needed to perform Tests.
|
public static junit.framework.Test | suite()Define suite of all the Tests to run.
TestSuite suite = new TestSuite(BundleReaderTest.class);
return suite;
|
protected void | tearDown()Free all the resources initilized/allocated to perform Tests.
|
public void | testCreate()
String bundleFile = "com/sun/enterprise/tools/" + //NOI18N
"common/validation/Bundle.properties"; //NOI18N
Utils utils = new Utils();
boolean fileExists = utils.fileExists(bundleFile);
String str =
BundleReader.getValue("MSG_NumberConstraint_Failure"); //NOI18N
if(fileExists){
assertTrue(!str.equals("MSG_NumberConstraint_Failure")); //NOI18N
} else {
assertTrue(str.equals("MSG_NumberConstraint_Failure")); //NOI18N
}
|
public void | testGetValue()
String str = BundleReader.getValue("non_existing_key"); //NOI18N
assertTrue(str.equals("non_existing_key")); //NOI18N
str = BundleReader.getValue("MSG_NumberConstraint_Failure"); //NOI18N
assertTrue(!str.equals("MSG_NumberConstraint_Failure")); //NOI18N
|