01: // Copyright (C) 2003,2004,2005 by Object Mentor, Inc. All rights reserved.
02: // Released under the terms of the GNU General Public License version 2 or later.
03: package fitnesse.responders.files;
04:
05: import fitnesse.*;
06: import fitnesse.testutil.AbstractRegex;
07: import fitnesse.http.*;
08:
09: public class DeleteConfirmationResponderTest extends AbstractRegex {
10: MockRequest request;
11:
12: private FitNesseContext context;
13:
14: public void setUp() throws Exception {
15: request = new MockRequest();
16: context = new FitNesseContext();
17: }
18:
19: public void testContentOfPage() throws Exception {
20: request.setResource("files");
21: request.addInput("filename", "MyFile.txt");
22: Responder responder = new DeleteConfirmationResponder();
23: SimpleResponse response = (SimpleResponse) responder
24: .makeResponse(context, request);
25: String content = response.getContent();
26:
27: assertSubString("deleteFile", content);
28: assertSubString("Delete File", content);
29: assertSubString("MyFile.txt", content);
30: }
31:
32: }
|