FileDocCategorySizeDatePackage
AppName.javaAPI DocGlassfish v2 API3222Fri May 04 22:33:28 BST 2007com.sun.enterprise.tools.verifier.tests.app

AppName

public class AppName extends com.sun.enterprise.tools.verifier.tests.app.ApplicationTest implements AppCheck
Application's name test. The Application provider must assign a display name to each Application

Fields Summary
Constructors Summary
Methods Summary
public Resultcheck(Application descriptor)
Application's name test. The Application provider must assign a display name to each Application

param
descriptor the Application deployment descriptor
return
Result the results for this assertion


	Result result = getInitializedResult();

    
	String appName = descriptor.getName();

	if (appName != null && appName.length() > 0 ) {
	    // as long as it's not blank, test should pass
	    result.passed
		(smh.getLocalString
		 (getClass().getName() + ".passed", 
		  "Application display name is : [ {0} ]", 
		  new Object [] {appName}));
	} else {
	    // it's blank, test should not pass
	    
		result.failed
		(smh.getLocalString
		 (getClass().getName() + ".failed", 
		  "Error: Application display name cannot be blank."));
	} 
	return result;