1 package com.openedit.archive; 2 3 import com.openedit.OpenEditException; 4 import com.openedit.modules.archive.ArchiveModule; 5 import com.openedit.modules.cart.StoreDataReader; 6 import com.openedit.store.Store; 7 import com.openedit.store.StoreTestCase; 8 9 public abstract class ArchiveTest extends StoreTestCase 10 { 11 protected Archive fArchive; 12 13 public ArchiveTest( String inName ) 14 { 15 super( inName ); 16 } 17 18 protected Archive getArchive() throws OpenEditException 19 { 20 if ( fArchive == null ) 21 { 22 fArchive = ( (ArchiveModule) getModule( "ArchiveModule" ) ).getArchive( 23 getFixture().createPageRequest("/testcatalog/index.html") ); 24 } 25 return fArchive; 26 } 27 28 protected Store getStore() throws OpenEditException 29 { 30 if ( fieldStore == null) 31 { 32 StoreDataReader reader = (StoreDataReader)getFixture().getModuleManager().getBean("AssetStoreDataReader"); 33 fieldStore = reader.getStore("testcatalog"); 34 } 35 return fieldStore; 36 } 37 38 } 39 | Popular Tags |