1   package uba.db.sql.language;
2   
3   import junit.framework.TestCase;
4   import uba.db.testhelpers.TestUtils;
5   
6   /***
7    * Test de unidad para {@link uba.db.sql.language.TableSelectionSource}.
8    * 
9    * @version $Revision: 1.2 $
10   */
11  public class TableSelectionSourceTest extends TestCase {
12      /***
13       * Test de igualdad entre dos instancias.
14       */
15      public void testEquals() throws Exception {
16          TestUtils.assertEqualsImplementation(new TableSelectionSource("A"),
17                                               new TableSelectionSource("A"),
18                                               new TableSelectionSource("B"));
19      }
20  
21      /***
22       * Crear un selection source haciendo join con otro selection source.
23       */
24      public void testJoin() throws Exception {
25          TableSelectionSource a = new TableSelectionSource("A");
26          TableSelectionSource b = new TableSelectionSource("B");
27          Join join = new Join(a, b);
28  
29          assertEquals(join, a.join(b));
30      }
31  }