cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nicolas Maisonneuve" <n.maisonne...@HotPOP.com>
Subject tescase avalon component in cocoon
Date Mon, 01 Sep 2003 21:24:19 GMT
hy, 
i would like use the Excalibur Testcase for test my avalon component in cocoon 
but i don't know how do ?

i tried  with this code but my component use contextualize method  and 
there is a contextException because the context object is not a cocoon context
note : i have not experience in TestCase..

my code : 

public class TestIndexComponentImpl extends ExcaliburTestCase {

  public TestIndexComponentImpl(String name) {
    super(name);
  }

  protected void setUp() throws Exception {
    super.setUp();
    FileInputStream reader=new FileInputStream("d://testcase.xml");
    this.prepare(reader);
  }

  protected void tearDown() throws Exception {
    super.tearDown();
  }

  public void testAnalyzer() {
    try {
      AnalyzerManager manager = (AnalyzerManager)this.lookup(AnalyzerManager.ROLE);
    }
    catch (ComponentException ex) {
      ex.printStackTrace();
    }
    this.assertNotNull(manager);
  }


Mime
View raw message