jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Lenz <cml...@gmx.de>
Subject Re: tests not found while a testXXX method exists...
Date Wed, 15 Jan 2003 08:24:56 GMT
Hi Philippe,

see below...

Philippe Petit wrote:
> Hi,
> 
> I'm getting AssertionFailedError with the message "no tests found" but I do
> have a method beginning with"test".
> here is the code used :
> 
> public void beginDoPost(WebRequest webRequest)
> {
> OrganizationWorkerBean bean = new OrganizationWorkerBean(
> "My Org",
> "My org activity",
> "www.pouf.org",
> "SOCIETE",
> "Mr",
> "Name1",
> "firstName1",
> "+33 1 00 00 11 11 11",
> "Office",
> "firstName1.Name1@noos.fr",
> "",
> "11 bis",
> "Bld",
> "de Charonne",
> "",
> "75011",
> "Paris cedex 11",
> "FR",
> "+33 1 11 11 11 11 11",
> "admin",
> null,
> 0 );
> request.setAttribute("Organization", bean);
> request.setAttribute("dispatchto", "List_Orgs");
> request.setAttribute("crud", "Create");
> }
> /*
> * Test for void doPost(HttpServletRequest, HttpServletResponse)
> */
> public void testDoPost(WebRequest webRequest)

replace that with

 > public void testDoPost()

(no arguments)

> {
> OrgControllerServlet servlet = new OrgControllerServlet();
> try
> {
> servlet.init();
> }
> catch (ServletException e)
> {
> }
> servlet.doPost(request, null);
> list = (Vector)request.getAttribute( "organizations" );
> assertTrue(list != null);
> }
> 
> I don't know why it's not working...
> Any help is welcome.

-- 
Christopher Lenz
/=/ cmlenz at gmx.de


Mime
View raw message