01: /*
02: * Created on 15.10.2004
03: *
04: * TODO To change the template for this generated file go to
05: * Window - Preferences - Java - Code Style - Code Templates
06: */
07: package org.jzonic.webtester;
08:
09: import org.jzonic.webtester.commands.*;
10:
11: import junit.framework.TestCase;
12:
13: /**
14: * @author Mecky
15: *
16: * TODO To change the template for this generated type comment go to
17: * Window - Preferences - Java - Code Style - Code Templates
18: */
19: public class CombinedCommandTest extends TestCase {
20:
21: public void testOne() {
22: WebTestContext ctx = new WebTestContext();
23: SetProxyCommand pcmd = new SetProxyCommand();
24: pcmd.setParameter("62.192.192.41:8080");
25: WebTestNodeResult result = pcmd.execute(ctx);
26: assertNotNull(result);
27: assertTrue(result.isSuccess());
28: GetHtmlCommand command = new GetHtmlCommand();
29: command.setParameter("http://www.google.de");
30: result = command.execute(ctx);
31: assertNotNull(result);
32: assertTrue(result.isSuccess());
33: CheckTextCommand textCmd = new CheckTextCommand();
34: textCmd.setParameter("Google");
35: result = textCmd.execute(ctx);
36: assertNotNull(result);
37: assertTrue(result.isSuccess());
38: }
39:
40: }
|