package ca.nrc.cadc.vos;

import javax.sql.DataSource;

import org.junit.Before;
import org.junit.Test;

public abstract class VOSpaceFileMetadataSourceTest extends PersistenceTest
{
    private VOSpaceFileMetadataSource vospaceFileMetadataSource;
    private DataNode testNode;
    
    @Before
    public void before() throws Exception
    {
        super.commonBefore();
        vospaceFileMetadataSource = new VOSpaceFileMetadataSource();
        vospaceFileMetadataSource.setNodePersistence(nodeDAO);
        
        ContainerNode rootContainer = (ContainerNode) nodeDAO.getFromParent(getRootContainerName(), null);
        testNode = new DataNode(getVOSURIPrefix() + getRootContainerName() + "/" + getNodeName("testNode"));
        nodeDAO.putInContainer(testNode, rootContainer);
    }
    
    public abstract DataSource getDataSource();
    
    public abstract NodeDAO getNodeDAO(DataSource dataSource);
    
    public abstract String getVOSURIPrefix();
    
    public abstract String getRootContainerName();
    
    public abstract String getNodeOwner();
    
    @Test
    public void testMetadata() throws Exception
    {
        
    }

}

Put common persistence test code in abstract class PersistenceTest
Put common persistence test code in abstract class PersistenceTest

git-svn-id: 311fcc5b8b03427d323cee07bbb9e5a14d8d22e9@624 728ff76a-78ac-11de-a72b-d90af8dea425
