From users-return-55061-apmail-cocoon-users-archive=cocoon.apache.org@cocoon.apache.org Tue Sep 02 06:57:04 2003 Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 96473 invoked from network); 2 Sep 2003 06:57:04 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 2 Sep 2003 06:57:04 -0000 Received: (qmail 97792 invoked by uid 500); 2 Sep 2003 06:56:23 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 97719 invoked by uid 500); 2 Sep 2003 06:56:22 -0000 Mailing-List: contact users-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: users@cocoon.apache.org Delivered-To: mailing list users@cocoon.apache.org Received: (qmail 97703 invoked from network); 2 Sep 2003 06:56:22 -0000 Received: from unknown (HELO warden.diginsite.com) (208.29.163.248) by daedalus.apache.org with SMTP; 2 Sep 2003 06:56:22 -0000 Received: from wlvims01.diginsite.com by warden.diginsite.com via smtpd (for daedalus.apache.org [208.185.179.12]) with SMTP; Mon, 1 Sep 2003 23:56:34 -0700 Received: from calexc01.digitalinsight.com ([10.200.0.20]) by wlvims01.digitalinsight.com (Post.Office MTA v3.5.3 release 223 ID# 0-0U10L2S100V35) with ESMTP id com for ; Mon, 1 Sep 2003 23:56:21 -0700 Received: by calexc01.diginsite.com with Internet Mail Service (5.5.2653.19) id ; Mon, 1 Sep 2003 23:56:21 -0700 Message-ID: <31DF72A980E5D511B48C000102BD868503EA7F14@calexc01.diginsite.com> From: Ralph Goers To: "'users@cocoon.apache.org'" Subject: RE: tescase avalon component in cocoon Date: Mon, 1 Sep 2003 23:56:21 -0700 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C3711F.50CD69F0" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N ------_=_NextPart_001_01C3711F.50CD69F0 Content-Type: text/plain; charset="iso-8859-1" Try extending Cocoon's AbstractCompositeTestCase. It sets up mock objects and is set up to test generators, transformers and serializers. You can configure basic components and test them as well. The only thing I haven't figured out how to test with it is an input module. Ralph -----Original Message----- From: Nicolas Maisonneuve [mailto:n.maisonneuve@HotPOP.com] Sent: Monday, September 01, 2003 2:24 PM To: cocoon user Subject: tescase avalon component in cocoon 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); } ------_=_NextPart_001_01C3711F.50CD69F0 Content-Type: text/html; charset="iso-8859-1"
Try extending Cocoon's AbstractCompositeTestCase. It sets up mock objects and is set up to test generators, transformers and serializers. You can configure basic components and test them as well.  The only thing I haven't figured out how to test with it is an input module.
 
Ralph
-----Original Message-----
From: Nicolas Maisonneuve [mailto:n.maisonneuve@HotPOP.com]
Sent: Monday, September 01, 2003 2:24 PM
To: cocoon user
Subject: tescase avalon component in cocoon

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);
  }
 
------_=_NextPart_001_01C3711F.50CD69F0--