@@ -0,0 +1,1816 @@
+package edu.columbia.gemma.common.description;%0A%0Aimport org.apache.commons.logging.Log;%0Aimport org.apache.commons.logging.LogFactory;%0A%0Aimport edu.columbia.gemma.BaseDAOTestCase;%0A%0A/**%0A * %3Chr%3E%0A * %3Cp%3E%0A * Copyright (c) 2004-2005 Columbia University%0A * %0A * @author pavlidis%0A * @version $Id$%0A */%0Apublic class DatabaseEntryDaoImplTest extends BaseDAOTestCase %7B%0A    private static Log log = LogFactory.getLog( DatabaseEntryDaoImplTest.class.getName() );%0A    DatabaseEntryDao deDao;%0A    DatabaseEntry de;%0A%0A    ExternalDatabaseDao exdbDao;%0A%0A    /*%0A     * @see TestCase#setUp()%0A     */%0A    protected void setUp() throws Exception %7B%0A        super.setUp();%0A        deDao = ( DatabaseEntryDao ) ctx.getBean( %22databaseEntryDao%22 );%0A        exdbDao = ( ExternalDatabaseDao ) ctx.getBean( %22externalDatabaseDao%22 );%0A        de = DatabaseEntry.Factory.newInstance();%0A        de.setAccession( %22bar%22 );%0A        ExternalDatabase ed = exdbDao.findByName( %22PubMed%22 );%0A        assert ed != null;%0A        de.setExternalDatabase( ed );%0A        de = deDao.create( de );%0A    %7D%0A%0A    /*%0A     * @see TestCase#tearDown()%0A     */%0A    protected void tearDown() throws Exception %7B%0A        super.tearDown();%0A        deDao.remove( de );%0A    %7D%0A%0A    /*%0A     * Class under test for DatabaseEntry findOrCreate(DatabaseEntry)%0A     */%0A    public void testFindOrCreateDatabaseEntry() %7B%0A        deDao.remove( de );%0A        DatabaseEntry actualReturn = deDao.findOrCreate( de );%0A        assertEquals( de.getAccession(), actualReturn.getAccession() );%0A    %7D%0A%0A    /*%0A     * Class under test for edu.columbia.gemma.common.description.DatabaseEntry%0A     * find(edu.columbia.gemma.common.description.DatabaseEntry)%0A     */%0A    public void testFindDatabaseEntry() %7B%0A        DatabaseEntry actualReturn = deDao.find( de );%0A        assertEquals( de, actualReturn );%0A    %7D%0A%0A%7D%0A

test for databaseentry finders