You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by pr...@apache.org on 2002/11/30 01:43:24 UTC

cvs commit: jakarta-commons-sandbox/periodicity/src/plugins-build/database/src/test/org/apache/commons/periodicity/database DriverMDNullValueTests.java DriverMDProtocolsTests.java DriverProtocolNullValueTests.java

prickett    2002/11/29 16:43:24

  Modified:    periodicity/src/plugins-build/database/src/java/org/apache/commons/periodicity/database
                        DriverContentHandler.java DriverMetaData.java
                        DriverMetaDataImpl.java DriverProtocol.java
               periodicity/src/plugins-build/database/src/test/org/apache/commons/periodicity/database
                        DriverMDNullValueTests.java
                        DriverMDProtocolsTests.java
                        DriverProtocolNullValueTests.java
  Log:
  Moved processing of url tag and admin-url from the database handler to the
  driver handler.
  
  Moved DEFAULT_PROTOCOL_NAME from DriverMetaData to DriverProtocol.
  
  Fixed the protocol processing in DriverMetaDataImpl to use DriverProtocol
  
  Fixed the DriverProtocol constructor to set the default protocol name
  if newName is null.
  
  Fixed the test suite to reflect changes due to the new Driver Protocol class.
  
  Revision  Changes    Path
  1.8       +30 -4     jakarta-commons-sandbox/periodicity/src/plugins-build/database/src/java/org/apache/commons/periodicity/database/DriverContentHandler.java
  
  Index: DriverContentHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/periodicity/src/plugins-build/database/src/java/org/apache/commons/periodicity/database/DriverContentHandler.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- DriverContentHandler.java	29 Nov 2002 03:32:28 -0000	1.7
  +++ DriverContentHandler.java	30 Nov 2002 00:43:23 -0000	1.8
  @@ -98,6 +98,12 @@
       /** The qualified name of the url scheme element */
       public static final String SCHEME_QNAME = "scheme";
   
  +    /** The qualified name of the url element */
  +    public static final String URL_QNAME = "url";
  +
  +    /** The qualified name of the admin url element */
  +    public static final String ADMIN_URL_QNAME = "admin-url";
  +
       /** The qualified name of the protocol element */
       public static final String PROTOCOL_ELEMENT_QNAME = "protocol";
   
  @@ -117,6 +123,12 @@
       /** A variable to hold the protocol name for the current protocol */
       private String protocolName = null;
   
  +    /** A variable to hold the protocol url for the current protocol */
  +    private String protocolUrl = null;
  +
  +    /** A variable to hold the protocol administration url */
  +    private String protocolAdminUrl = null;
  +
       /** A variable to hold the protocols for the current driver */
       private Map protocols = null;
   
  @@ -206,12 +218,26 @@
               if(lookForDrivers && qName != null &&
                      qName.equals(PROTOCOL_ELEMENT_QNAME))
               {
  -                driverMeta.addProtocol(protocolName, scheme);
  +                DriverProtocol protocol = new DriverProtocol(protocolName, 
  +                       scheme);
  +                protocol.setUrl(protocolUrl);
  +                protocol.setAdminUrl(protocolAdminUrl);
  +                driverMeta.addProtocol(protocol);
               }
               else if(lookForDrivers && qName != null &&
                      qName.equals(SCHEME_QNAME))
               {
                   scheme = buffy.toString();
  +            }    
  +            else if(lookForDrivers && qName != null &&
  +                   qName.equals(URL_QNAME))
  +            {
  +                protocolUrl = buffy.toString();
  +            }
  +            else if(lookForDrivers && qName != null &&
  +                   qName.equals(ADMIN_URL_QNAME))
  +            {
  +                protocolAdminUrl = buffy.toString();
               }    
               else if(lookForDrivers && qName != null && 
                      qName.equals(DRIVER_ELEMENT_QNAME))
  
  
  
  1.5       +3 -4      jakarta-commons-sandbox/periodicity/src/plugins-build/database/src/java/org/apache/commons/periodicity/database/DriverMetaData.java
  
  Index: DriverMetaData.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/periodicity/src/plugins-build/database/src/java/org/apache/commons/periodicity/database/DriverMetaData.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DriverMetaData.java	27 Oct 2002 22:27:18 -0000	1.4
  +++ DriverMetaData.java	30 Nov 2002 00:43:23 -0000	1.5
  @@ -68,7 +68,6 @@
   
   public interface DriverMetaData
   {
  -    public static final String DEFAULT_PROTOCOL_NAME = "default.protocol";
       
       /**
        * The purpose of this method is to return the name of this driver
  
  
  
  1.9       +10 -14    jakarta-commons-sandbox/periodicity/src/plugins-build/database/src/java/org/apache/commons/periodicity/database/DriverMetaDataImpl.java
  
  Index: DriverMetaDataImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/periodicity/src/plugins-build/database/src/java/org/apache/commons/periodicity/database/DriverMetaDataImpl.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- DriverMetaDataImpl.java	28 Oct 2002 09:23:36 -0000	1.8
  +++ DriverMetaDataImpl.java	30 Nov 2002 00:43:23 -0000	1.9
  @@ -237,21 +237,17 @@
        * @param newName The name of the new protocol as a string
        * @param newScheme The url scheme for the new protocol
        */
  -    void addProtocol(String newName, String newScheme) throws Exception
  +    void addProtocol(DriverProtocol newval) throws Exception
       {
  -        if(newName == null && newScheme != null)
  -        {
  -            addProtocol(DEFAULT_PROTOCOL_NAME, newScheme);
  -        }
  -        else if(newName != null && newScheme != null)
  +        if(newval != null)
           {
               if(protocols == null)
               {
                   protocols = new Hashtable();
               }
  -            protocols.put(newName, newScheme);
  +            protocols.put(newval.getName(), newval);
           }
  -        else if(newScheme == null)
  +        else if(newval == null)
           {
               throw new Exception("scheme == null");
           }
  @@ -283,7 +279,7 @@
                           {
                               Object rawScheme = newProtocols.get(rawName);
                               if(rawScheme != null && 
  -                                   rawScheme instanceof String)
  +                                   rawScheme instanceof DriverProtocol)
                               {       
                                   if(protocols == null)
                                   {
  @@ -405,11 +401,11 @@
        * @param protocolName The name of the protocol for which we want to
        *        retrieve the scheme.
        */
  -    String getUrlScheme(String protocolName) throws Exception
  +    DriverProtocol getProtocol(String protocolName) throws Exception
       {
           if(supportsProtocol(protocolName)) 
           {
  -            return (String) protocols.get(protocolName);
  +            return (DriverProtocol) protocols.get(protocolName);
           }
           else if(protocolName == null)
           {
  
  
  
  1.2       +9 -7      jakarta-commons-sandbox/periodicity/src/plugins-build/database/src/java/org/apache/commons/periodicity/database/DriverProtocol.java
  
  Index: DriverProtocol.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/periodicity/src/plugins-build/database/src/java/org/apache/commons/periodicity/database/DriverProtocol.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DriverProtocol.java	29 Nov 2002 16:53:28 -0000	1.1
  +++ DriverProtocol.java	30 Nov 2002 00:43:23 -0000	1.2
  @@ -64,6 +64,8 @@
   
   public class DriverProtocol extends Object
   {
  +    public static final String DEFAULT_PROTOCOL_NAME = "default.protocol";
  +    
       /** A variable to hold the name of the protocol */
       private String name = null;
   
  @@ -90,13 +92,13 @@
               setName(newName);
               setScheme(newScheme);
           }
  -        else if(newName == null)
  -        {
  -            throw new Exception("newName == null");
  -        }
           else if(newScheme == null)
           {
               throw new Exception("newScheme == null");
  +        }
  +        else if(newName == null)
  +        {
  +            setName(DEFAULT_PROTOCOL_NAME);
           }
           else
           {
  
  
  
  1.3       +5 -31     jakarta-commons-sandbox/periodicity/src/plugins-build/database/src/test/org/apache/commons/periodicity/database/DriverMDNullValueTests.java
  
  Index: DriverMDNullValueTests.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/periodicity/src/plugins-build/database/src/test/org/apache/commons/periodicity/database/DriverMDNullValueTests.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DriverMDNullValueTests.java	28 Oct 2002 09:23:36 -0000	1.2
  +++ DriverMDNullValueTests.java	30 Nov 2002 00:43:23 -0000	1.3
  @@ -216,7 +216,7 @@
           try
           {
               DriverMetaDataImpl driverMeta = new DriverMetaDataImpl("driver");
  -            driverMeta.addProtocol(null, null);
  +            driverMeta.addProtocol(null);
               fail(ADD_PROTOCOL_BOTH_NULL_EXCEPTION_MESG);
           }
           catch(Exception e)
  @@ -229,32 +229,6 @@
           try
           {
               DriverMetaDataImpl driverMeta = new DriverMetaDataImpl("driver");
  -            driverMeta.addProtocol(NON_NULL_STRING, null);
  -            fail(ADD_PROTOCOL_SCHEME_NULL_EXCEPTION_MESG);
  -        }
  -        catch(Exception e)
  -        {
  -            if(getLogger() != null)
  -            {
  -                getLogger().info("Expected Exception", e);
  -            }
  -        }    
  -        try
  -        {
  -            DriverMetaDataImpl driverMeta = new DriverMetaDataImpl("driver");
  -            driverMeta.addProtocol(null, NON_NULL_STRING);
  -            String scheme = driverMeta.getUrlScheme(
  -                   DriverMetaData.DEFAULT_PROTOCOL_NAME);
  -            assertEquals(ADD_PROTOCOL_DEFAULT_SCHEME_MESG, NON_NULL_STRING,
  -                   scheme);
  -        }
  -        catch(Exception e)
  -        {
  -            fail(ADD_PROTOCOL_UNEXPECTED_EXCEPTION_MESG);
  -        }
  -        try
  -        {
  -            DriverMetaDataImpl driverMeta = new DriverMetaDataImpl("driver");
               driverMeta.addProtocols(null);
           }
           catch(Exception e)
  @@ -275,7 +249,7 @@
           try
           {
               DriverMetaDataImpl driverMeta = new DriverMetaDataImpl("driver");
  -            String scheme = driverMeta.getUrlScheme(null);
  +            DriverProtocol scheme = driverMeta.getProtocol(null);
               fail(GETTING_NULL_PROTOCOL_EXPECT_EXCEPTION);
           }
           catch(Exception e)
  
  
  
  1.2       +93 -52    jakarta-commons-sandbox/periodicity/src/plugins-build/database/src/test/org/apache/commons/periodicity/database/DriverMDProtocolsTests.java
  
  Index: DriverMDProtocolsTests.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/periodicity/src/plugins-build/database/src/test/org/apache/commons/periodicity/database/DriverMDProtocolsTests.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DriverMDProtocolsTests.java	29 Oct 2002 10:19:17 -0000	1.1
  +++ DriverMDProtocolsTests.java	30 Nov 2002 00:43:23 -0000	1.2
  @@ -74,11 +74,13 @@
       
       public static final String DRIVER_NAME = "driver";
       
  -    public static final String protocolNames[] = 
  -           { "protocol.default", "protocol.http", "protocol.hsqldb" };
  +    public static DriverProtocol DEFAULT_PROTOCOL = null; 
       
  -    public static final String protocolSchemes[] =
  -           { "jdbc:hsql", "jdbc:hsql:HTTP", "jdbc:hsql:HSQL" };
  +    public static DriverProtocol HTTP_PROTOCOL = null;
  +    
  +    public static DriverProtocol HSQLDB_PROTOCOL = null;
  +    
  +    public static DriverProtocol driverProtocols[] = null; 
       
       public static final String PROTOCOLS_DO_NOT_MATCH =
              "The protocols returned to not match those that were set.";
  @@ -122,11 +124,31 @@
       {
           try
           {
  +            DEFAULT_PROTOCOL = 
  +                  new DriverProtocol("protocol.default", "jdbc:hsql");
  +    
  +            HTTP_PROTOCOL = 
  +                  new DriverProtocol("protocol.http", "jdbc:hsql:http");
  +    
  +            HSQLDB_PROTOCOL =
  +                  new DriverProtocol("protocol.hsqldb", "jdbc:hsql:hsqldb");
  +           
  +            driverProtocols = new DriverProtocol[3];
  +            driverProtocols[0] = DEFAULT_PROTOCOL;
  +            driverProtocols[1] = HTTP_PROTOCOL;
  +            driverProtocols[2] = HSQLDB_PROTOCOL;
  +        }
  +        catch(Exception e)
  +        {
  +            fail("Driver Protocols not initialized.");
  +        }    
  +        try
  +        {
               DriverMetaDataImpl driverMeta = 
                      new DriverMetaDataImpl(DRIVER_NAME);
  -            for(int i=0; i < protocolNames.length; i++)
  +            for(int i=0; i < driverProtocols.length; i++)
               {
  -                driverMeta.addProtocol(protocolNames[i], protocolSchemes[i]);
  +                driverMeta.addProtocol(driverProtocols[i]);
               }
               protocolsCorrect(driverMeta);
           }
  @@ -138,11 +160,12 @@
           {
               DriverMetaDataImpl driverMeta =
                      new DriverMetaDataImpl(DRIVER_NAME);
  -            driverMeta.addProtocol(protocolNames[0], protocolSchemes[0]);       
  +            driverMeta.addProtocol(driverProtocols[0]);       
               Hashtable protocolMap = new Hashtable();
  -            for(int i=1; i < protocolNames.length; i++)
  +            for(int i=1; i < driverProtocols.length; i++)
               {
  -                protocolMap.put(protocolNames[i], protocolSchemes[i]);
  +                protocolMap.put(driverProtocols[i].getName(), 
  +                       driverProtocols[i]);
               }
               driverMeta.addProtocols(protocolMap);
               protocolsCorrect(driverMeta);
  @@ -156,9 +179,10 @@
               DriverMetaDataImpl driverMeta =
                      new DriverMetaDataImpl(DRIVER_NAME);
               Hashtable protocolMap = new Hashtable();       
  -            for(int i=0; i < protocolNames.length; i++)
  +            for(int i=0; i < driverProtocols.length; i++)
               {
  -                protocolMap.put(protocolNames[i], protocolSchemes[i]);
  +                protocolMap.put(driverProtocols[i].getName(), 
  +                       driverProtocols[i]);
               }
               driverMeta.setProtocols(protocolMap);
               protocolsCorrect(driverMeta);
  @@ -172,19 +196,22 @@
               DriverMetaDataImpl driverMeta = 
                      new DriverMetaDataImpl(DRIVER_NAME);
               Hashtable protocolMap = new Hashtable();       
  -            for(int i=0; i < protocolNames.length; i++)
  +            for(int i=0; i < driverProtocols.length; i++)
               {
  -                protocolMap.put(protocolNames[i], protocolSchemes[i]);
  +                protocolMap.put(driverProtocols[i].getName(), driverProtocols[i]);
               }
               driverMeta.setProtocols(protocolMap);
  -            driverMeta.removeProtocol(protocolNames[2]);
  -            String protocol2 = driverMeta.getUrlScheme(protocolNames[2]);
  +            driverMeta.removeProtocol(driverProtocols[2].getName());
  +            DriverProtocol protocol2 = driverMeta.getProtocol(
  +                   driverProtocols[2].getName());
               assertNull(PROTOCOL_SHOULD_NOT_BE_SUPPORTED, protocol2);
  -            String protocol0 = driverMeta.getUrlScheme(protocolNames[0]);
  -            assertEquals(PROTOCOL_SHOULD_BE_SUPPORTED, protocolSchemes[0], 
  +            DriverProtocol protocol0 = driverMeta.getProtocol(
  +                   driverProtocols[0].getName());
  +            assertEquals(PROTOCOL_SHOULD_BE_SUPPORTED, driverProtocols[0], 
                      protocol0);
  -            String protocol1 = driverMeta.getUrlScheme(protocolNames[1]);
  -            assertEquals(PROTOCOL_SHOULD_BE_SUPPORTED, protocolSchemes[1],
  +            DriverProtocol protocol1 = driverMeta.getProtocol(
  +                   driverProtocols[1].getName());
  +            assertEquals(PROTOCOL_SHOULD_BE_SUPPORTED, driverProtocols[1],
                      protocol1);
           }
           catch(Exception e)
  @@ -196,21 +223,24 @@
               DriverMetaDataImpl driverMeta =
                      new DriverMetaDataImpl(DRIVER_NAME);
               Hashtable protocolMap = new Hashtable();       
  -            for(int i=0; i < protocolNames.length; i++)
  +            for(int i=0; i < driverProtocols.length; i++)
               {
  -                protocolMap.put(protocolNames[i], protocolSchemes[i]);
  +                protocolMap.put(driverProtocols[i].getName(), driverProtocols[i]);
               }
               driverMeta.setProtocols(protocolMap);
               Hashtable removeMap = new Hashtable();
  -            removeMap.put(protocolNames[2], protocolSchemes[2]);
  -            removeMap.put(protocolNames[1], protocolNames[1]);
  +            removeMap.put(driverProtocols[2].getName(), driverProtocols[2]);
  +            removeMap.put(driverProtocols[1].getName(), driverProtocols[1]);
               driverMeta.removeProtocols(removeMap);
  -            String protocol0 = driverMeta.getUrlScheme(protocolNames[0]);
  -            assertEquals(PROTOCOL_SHOULD_BE_SUPPORTED, protocolSchemes[0],
  +            DriverProtocol protocol0 = driverMeta.getProtocol(
  +                   driverProtocols[0].getName());
  +            assertEquals(PROTOCOL_SHOULD_BE_SUPPORTED, driverProtocols[0],
                      protocol0);
  -            String protocol1 = driverMeta.getUrlScheme(protocolNames[1]);
  +            DriverProtocol protocol1 = driverMeta.getProtocol(
  +                   driverProtocols[1].getName());
               assertNull(PROTOCOL_SHOULD_NOT_BE_SUPPORTED, protocol1);
  -            String protocol2 = driverMeta.getUrlScheme(protocolNames[2]);
  +            DriverProtocol protocol2 = driverMeta.getProtocol(
  +                   driverProtocols[2].getName());
               assertNull(PROTOCOL_SHOULD_NOT_BE_SUPPORTED, protocol2);
               
           }    
  @@ -223,9 +253,10 @@
               DriverMetaDataImpl driverMeta =
                      new DriverMetaDataImpl(DRIVER_NAME);
               Hashtable protocolMap = new Hashtable();
  -            for(int i=0; i < protocolNames.length; i++)
  +            for(int i=0; i < driverProtocols.length; i++)
               {
  -                protocolMap.put(protocolNames[i], protocolSchemes[i]);
  +                protocolMap.put(driverProtocols[i].getName(), 
  +                       driverProtocols[i]);
               }
               driverMeta.setProtocols(protocolMap);
               assertNotNull(PROTOCOL_MAP_SHOULD_NOT_BE_NULL, 
  @@ -235,6 +266,10 @@
           }    
           catch(Exception e)
           {
  +            if(getLogger() != null)
  +            {
  +                getLogger().info("Unexpected Exception", e);
  +            }    
               fail(REMOVING_ALL_PROTOCOLS_NO_EXCEPTION);
           }
           try
  @@ -242,19 +277,22 @@
               DriverMetaDataImpl driverMeta = 
                      new DriverMetaDataImpl(DRIVER_NAME);
               Hashtable protocolMap = new Hashtable();
  -            for(int i=0; i < protocolNames.length; i++)
  +            for(int i=0; i < driverProtocols.length; i++)
               {
  -                protocolMap.put(protocolNames[i], protocolSchemes[i]);
  +                protocolMap.put(driverProtocols[i].getName(), driverProtocols[i]);
               }
               driverMeta.setProtocols(protocolMap);
  -            String protocol0 = driverMeta.getUrlScheme(protocolNames[0]);
  -            assertEquals(PROTOCOL_SHOULD_BE_SUPPORTED, protocolSchemes[0],
  +            DriverProtocol protocol0 = driverMeta.getProtocol(
  +                   driverProtocols[0].getName());
  +            assertEquals(PROTOCOL_SHOULD_BE_SUPPORTED, driverProtocols[0],
                      protocol0);
  -            String protocol1 = driverMeta.getUrlScheme(protocolNames[1]);
  -            assertEquals(PROTOCOL_SHOULD_BE_SUPPORTED, protocolSchemes[1],
  +            DriverProtocol protocol1 = driverMeta.getProtocol(
  +                   driverProtocols[1].getName());
  +            assertEquals(PROTOCOL_SHOULD_BE_SUPPORTED, driverProtocols[1],
                      protocol1);
  -            String protocol2 = driverMeta.getUrlScheme(protocolNames[2]);       
  -            assertEquals(PROTOCOL_SHOULD_BE_SUPPORTED, protocolSchemes[2],
  +            DriverProtocol protocol2 = driverMeta.getProtocol(
  +                   driverProtocols[2].getName());       
  +            assertEquals(PROTOCOL_SHOULD_BE_SUPPORTED, driverProtocols[2],
                      protocol2);
           }
           catch(Exception e)
  @@ -266,17 +304,17 @@
               DriverMetaDataImpl driverMeta =
                      new DriverMetaDataImpl(DRIVER_NAME);
               Hashtable protocolMap = new Hashtable();
  -            for(int i=0; i < protocolNames.length; i++)
  +            for(int i=0; i < driverProtocols.length; i++)
               {
  -                protocolMap.put(protocolNames[i], protocolSchemes[i]);
  +                protocolMap.put(driverProtocols[i].getName(), driverProtocols[i]);
               }
               driverMeta.setProtocols(protocolMap);
               assertTrue(PROTOCOL_SHOULD_BE_SUPPORTED, 
  -                   driverMeta.supportsProtocol(protocolNames[0]));
  +                   driverMeta.supportsProtocol(driverProtocols[0].getName()));
               assertTrue(PROTOCOL_SHOULD_BE_SUPPORTED,
  -                   driverMeta.supportsProtocol(protocolNames[1]));
  +                   driverMeta.supportsProtocol(driverProtocols[1].getName()));
               assertTrue(PROTOCOL_SHOULD_BE_SUPPORTED,
  -                   driverMeta.supportsProtocol(protocolNames[2]));
  +                   driverMeta.supportsProtocol(driverProtocols[2].getName()));
               assertTrue(PROTOCOL_SHOULD_NOT_BE_SUPPORTED,
                      !driverMeta.supportsProtocol(UNSUPPORTED_PROTOCOL_NAME));
           }
  @@ -293,15 +331,18 @@
           if(protocolMap != null)
           {
               assertEquals(NUMBER_OF_EXPECTED_PROTOCOLS_INCORRECT,
  -                   protocolNames.length, protocolMap.size());
  -            String protocol0 = driverMeta.getUrlScheme(protocolNames[0]);       
  -            assertEquals(PROTOCOL_SHOULD_BE_SUPPORTED, protocolSchemes[0],
  +                   driverProtocols.length, protocolMap.size());
  +            DriverProtocol protocol0 = driverMeta.getProtocol(
  +                   driverProtocols[0].getName());       
  +            assertEquals(PROTOCOL_SHOULD_BE_SUPPORTED, driverProtocols[0],
                      protocol0);
  -            String protocol1 = driverMeta.getUrlScheme(protocolNames[1]);       
  -            assertEquals(PROTOCOL_SHOULD_BE_SUPPORTED, protocolSchemes[1],
  +            DriverProtocol protocol1 = driverMeta.getProtocol(
  +                   driverProtocols[1].getName());       
  +            assertEquals(PROTOCOL_SHOULD_BE_SUPPORTED, driverProtocols[1],
                      protocol1);
  -            String protocol2 = driverMeta.getUrlScheme(protocolNames[2]);       
  -            assertEquals(PROTOCOL_SHOULD_BE_SUPPORTED, protocolSchemes[2],
  +            DriverProtocol protocol2 = driverMeta.getProtocol(
  +                   driverProtocols[2].getName());       
  +            assertEquals(PROTOCOL_SHOULD_BE_SUPPORTED, driverProtocols[2],
                      protocol2);
           }
           else
  
  
  
  1.2       +5 -9      jakarta-commons-sandbox/periodicity/src/plugins-build/database/src/test/org/apache/commons/periodicity/database/DriverProtocolNullValueTests.java
  
  Index: DriverProtocolNullValueTests.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/periodicity/src/plugins-build/database/src/test/org/apache/commons/periodicity/database/DriverProtocolNullValueTests.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DriverProtocolNullValueTests.java	29 Nov 2002 17:49:43 -0000	1.1
  +++ DriverProtocolNullValueTests.java	30 Nov 2002 00:43:23 -0000	1.2
  @@ -109,15 +109,11 @@
           try
           {
               DriverProtocol dp = new DriverProtocol(null, VALID_SCHEME);
  -            fail("DriverProtocol constructor with null name " +
  -                   "should throw an exception.");
           }
           catch(Exception e)
           {
  -            if(getLogger() != null)
  -            {
  -                getLogger().info("Expected Exception", e);
  -            }
  +            fail("DriverProtocol constructor with null name " +
  +                   "should not throw an exception.");
           }
           try
           {
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>