예제 #1
0
  public void testCreate() {
    String bundleFile =
        "org/netbeans/modules/"
            + // NOI18N
            "j2ee/sun/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
    }
  }
예제 #2
0
 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
 }