1 23 package com.sun.enterprise.tools.verifier.tests.app; 24 25 import com.sun.enterprise.tools.verifier.tests.app.ApplicationTest; 26 import com.sun.enterprise.deployment.*; 27 import com.sun.enterprise.tools.verifier.*; 28 29 30 34 public class AppName extends ApplicationTest implements AppCheck { 35 36 37 45 public Result check(Application descriptor) { 46 47 Result result = getInitializedResult(); 48 49 50 String appName = descriptor.getName(); 51 52 if (appName != null && appName.length() > 0 ) { 53 result.passed 55 (smh.getLocalString 56 (getClass().getName() + ".passed", 57 "Application display name is : [ {0} ]", 58 new Object [] {appName})); 59 } else { 60 62 result.failed 63 (smh.getLocalString 64 (getClass().getName() + ".failed", 65 "Error: Application display name cannot be blank.")); 66 } 67 return result; 68 } 69 } 70 | Popular Tags |