KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > openedit > archive > cumulus > CumulusSyncTest


1 /*
2  * Created on Mar 24, 2006
3  */

4 package com.openedit.archive.cumulus;
5
6 import java.util.ArrayList JavaDoc;
7
8 import junit.textui.TestRunner;
9
10 import org.junit.runner.Runner;
11
12 import com.canto.cumulus.ServerCatalog;
13 import com.openedit.archive.ArchiveTest;
14
15 public class CumulusSyncTest extends ArchiveTest
16 {
17     public CumulusSyncTest(String JavaDoc inArg0)
18     {
19         super(inArg0);
20     }
21     
22     public static void main(String JavaDoc[] args)
23     {
24         //new TestRunner().run(new CumulusSyncTest("testSync"));
25
new TestRunner().run(new CumulusSyncTest("testReindex"));
26     }
27     /*
28     protected void setUp() throws Exception
29     {
30         super.setUp();
31         Cumulus.CumulusStart();
32     }
33     protected void tearDown() throws Exception
34     {
35         super.tearDown();
36         Cumulus.CumulusStop();
37     }
38     */

39     public void testSync() throws Exception JavaDoc
40     {
41         //We are going to monitor for changes in each catalog
42
CumulusSyncConverter converter = (CumulusSyncConverter)getFixture().getModuleManager().getBean("cumulusSyncConverter");
43         converter.convert(getArchive().getStore(), new ArrayList JavaDoc());
44     }
45
46     public void testUserSync() throws Exception JavaDoc
47     {
48         //We are going to monitor for changes in each catalog
49
CumulusUserConverter converter = (CumulusUserConverter)getFixture().getModuleManager().getBean("cumulusUserConverter");
50
51         ServerCatalog cat = converter.getServerCatalogs().getServerCatalog("$Users");
52         converter.parseUsers(cat, getArchive());
53     }
54     public void XtestReindex() throws Exception JavaDoc
55     {
56         getArchive().getStore().reindexAll();
57     }
58     public void testLogConvert() throws Exception JavaDoc
59     {
60         CumulusSyncConverter converter = (CumulusSyncConverter)getFixture().getModuleManager().getBean("cumulusSyncConverter");
61         converter.convert(getArchive().getStore(), new ArrayList JavaDoc());
62     }
63     protected void tearDown() throws Exception JavaDoc
64     {
65         super.tearDown();
66         //Cumulus.CumulusStop();
67
}
68 }
69
Popular Tags