Hi
I am using cactus and I am trying to test a meta tag BUT I continously
get a false for isHtml() or an execpection telling me that the content
is not text/html but text/plain.
How do i test meta tags?
here is the code...
import javax.servlet.*;
import javax.servlet.http.*;
import org.apache.cactus.*;
import junit.framework.*;
/**
* @author Hugo A. Garcia
* Jul 8, 2002
**/
public class SimpleTest extends ServletTestCase {
/**
* Constructor for SimpleTest.
* @param arg0
*/
public SimpleTest(String arg0) {
super(arg0);
}
public void testSendParams() {
Browse servlet = (Browse) WikiStrategy.create("Browse");
}
public void endSendParams(com.meterware.httpunit.WebResponse
aWebResponse) {
assertTrue(aWebResponse.isHTML());
/*
try {
String[] commandAttribute = null;
commandAttribute =
aWebResponse.getMetaTagContent("name", "command");
assertEquals("Browse", commandAttribute[0]);
} catch (SAXException e) {
e.printStackTrace();
}
*/
}
}
-------------
import javax.servlet.*;
import javax.servlet.http.*;
import org.apache.cactus.*;
import junit.framework.*;
/**
* @author Hugo A. Garcia
* Jul 8, 2002
**/
public class SimpleTest extends ServletTestCase {
/**
* Constructor for SimpleTest.
* @param arg0
*/
public SimpleTest(String arg0) {
super(arg0);
}
public void testSendParams() {
Simple servlet = new Simple();
}
public void endSendParams(com.meterware.httpunit.WebResponse
aWebResponse) {
assertTrue(aWebResponse.isHTML());
/*
try {
String[] commandAttribute = null;
commandAttribute =
aWebResponse.getMetaTagContent("name", "command");
assertEquals("Browse", commandAttribute[0]);
} catch (SAXException e) {
e.printStackTrace();
}
*/
}
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>