Show
Ignore:
Timestamp:
02/25/10 20:57:40 (2 years ago)
Author:
martijn
Message:

Refactoring dead code:
Removed all methods pertaining to constructing Derby databases
to a separate package (org.bridgedb.rdb.construct). Also
factored out common code between SimpleGdbImpl?2/3 into
SimpleGdbImplCommon?

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/org.bridgedb.rdb/test/org/bridgedb/rdb/Test2.java

    r308 r317  
    2525import junit.framework.TestCase; 
    2626 
     27import org.bridgedb.AttributeMapper; 
    2728import org.bridgedb.BridgeDb; 
    2829import org.bridgedb.DataSource; 
     
    3031import org.bridgedb.IDMapperException; 
    3132import org.bridgedb.Xref; 
    32 import org.bridgedb.rdb.DataDerby; 
    3333import org.bridgedb.rdb.SimpleGdb; 
    3434import org.bridgedb.rdb.SimpleGdbFactory; 
     
    8181                // test special attributes that are grabbed from backpage 
    8282                // since this is a Schema v2 database 
    83                 SimpleGdb gdb = SimpleGdbFactory.createInstance (GDB_HUMAN, new DataDerby(), 0); 
     83                IDMapper gdb = BridgeDb.connect ("idmapper-pgdb:" + GDB_HUMAN); 
     84                AttributeMapper am = (AttributeMapper)gdb; 
    8485                Xref ref = new Xref ("26873", DataSource.getBySystemCode("L")); 
    85                 assertTrue (gdb.getAttributes(ref, "Synonyms").contains ("5-Opase|DKFZP434H244|OPLA")); 
    86                 assertTrue (gdb.getAttributes(ref, "Description").contains ("5-oxoprolinase (EC 3.5.2.9) (5-oxo-L-prolinase) (5-OPase) (Pyroglutamase) [Source:UniProtKB/Swiss-Prot.Acc:O14841]")); 
    87                 assertTrue (gdb.getAttributes(ref, "Chromosome").contains ("8")); 
    88                 assertTrue (gdb.getAttributes(ref, "Symbol").contains ("OPLAH")); 
     86                assertTrue (am.getAttributes(ref, "Synonyms").contains ("5-Opase|DKFZP434H244|OPLA")); 
     87                assertTrue (am.getAttributes(ref, "Description").contains ("5-oxoprolinase (EC 3.5.2.9) (5-oxo-L-prolinase) (5-OPase) (Pyroglutamase) [Source:UniProtKB/Swiss-Prot.Acc:O14841]")); 
     88                assertTrue (am.getAttributes(ref, "Chromosome").contains ("8")); 
     89                assertTrue (am.getAttributes(ref, "Symbol").contains ("OPLAH")); 
    8990                 
    9091                Set<String> allExpectedAttributes = new HashSet<String>();