Save This Page
Home » jdo2-tck-2.3-ea-src » org.apache.jdo.tck.api.persistencemanagerfactory » [javadoc | source]
    1   /*
    2    * Licensed to the Apache Software Foundation (ASF) under one or more
    3    * contributor license agreements.  See the NOTICE file distributed with
    4    * this work for additional information regarding copyright ownership.
    5    * The ASF licenses this file to You under the Apache License, Version 2.0
    6    * (the "License"); you may not use this file except in compliance with
    7    * the License.  You may obtain a copy of the License at
    8    * 
    9    *     http://www.apache.org/licenses/LICENSE-2.0
   10    * 
   11    * Unless required by applicable law or agreed to in writing, software 
   12    * distributed under the License is distributed on an "AS IS" BASIS, 
   13    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
   14    * See the License for the specific language governing permissions and 
   15    * limitations under the License.
   16    */
   17    
   18   package org.apache.jdo.tck.api.persistencemanagerfactory;
   19   
   20   import org.apache.jdo.tck.JDO_Test;
   21   import org.apache.jdo.tck.util.BatchTestRunner;
   22   
   23   
   24   /**
   25    *<B>Title:</B>Set ConnectionPassword of persistencemanagerfactory  
   26    *<BR>
   27    *<B>Keywords:</B> persistencemanagerfactory
   28    *<BR>
   29    *<B>Assertion IDs:</B> A11.1-15.
   30    *<BR>
   31    *<B>Assertion Description: </B>
   32    * PersistenceManagerFactory.setConnectionPassword(String password) sets the
   33    * value of the ConnectionPassword property (the password for the user) 
   34    */
   35   
   36   public class SetConnectionPassword extends JDO_Test {
   37       
   38       /** */
   39       private static final String ASSERTION_FAILED = 
   40           "Assertion A11.1-15 (SetConnectionPassword) failed: ";
   41       
   42       /** The value of the ConnectionPassword property. */
   43       private String password;
   44   
   45       /**
   46        * The <code>main</code> is called when the class
   47        * is directly executed from the command line.
   48        * @param args The arguments passed to the program.
   49        */
   50       public static void main(String[] args) {
   51           BatchTestRunner.run(SetConnectionPassword.class);
   52       }
   53   
   54       /** */
   55       protected void localSetUp() {
   56           closePMF();
   57           pmf = getUnconfiguredPMF();
   58           password = getPMFProperty(CONNECTION_PASSWORD_PROP);
   59       }
   60       
   61       /** 
   62        * Set ConnectionPassword.
   63        */
   64       public void test() {
   65           try {
   66               pmf.setConnectionPassword(password);
   67           } finally {
   68               closePMF();
   69           }
   70       }
   71   }

Save This Page
Home » jdo2-tck-2.3-ea-src » org.apache.jdo.tck.api.persistencemanagerfactory » [javadoc | source]