001    package com.sptci.rwt;
002    
003    import java.util.Collection;
004    
005    import static junit.framework.Assert.*;
006    import junit.framework.Test;
007    import junit.framework.TestCase;
008    import junit.framework.TestSuite;
009    
010    /**
011     * Unit test for the {@link DBMSAnalyser} object.
012     *
013     * <p>Copyright 2007 <a href='http://sptci.com/' target='_new'>Sans Pareil Technologies, Inc.</a></p>
014     * @author Rakesh Vidyadharan 2007-09-25
015     * @version $Id: DBMSAnalyserTest.java 4123 2008-05-25 21:49:01Z rakesh $
016     */
017    public class DBMSAnalyserTest extends TestCase
018    {
019      static DBMSMetaData metadata;
020    
021      public static Test suite()
022      {
023        return new TestSuite( DBMSAnalyserTest.class );
024      }
025    
026      /**
027       * Test fetching all schemas from the database connection.
028       */
029      public void testAnalyse() throws Exception
030      {
031        DBMSAnalyser analyser = new DBMSAnalyser(
032            CreateTestObjects.manager );
033        metadata = analyser.analyse();
034    
035        assertNotNull( "Checking non-null metadata", metadata );
036        assertNotNull( "Checking non-null JDBCMetaData",
037            metadata.getJdbcMetaData() );
038        assertNotNull( "Checking non-null LimitsMetaData", metadata.getLimitsMetaData() );
039      }
040    }