01: /*
02: * Copyright (c) 2002-2003 by OpenSymphony
03: * All rights reserved.
04: */
05: package com.opensymphony.webwork.views.jsp.ui;
06:
07: import com.opensymphony.webwork.components.AbstractRichtexteditorConnector;
08:
09: /**
10: *
11: * @author tm_jee
12: * @version $Date: 2006-02-17 16:21:02 +0100 (Fri, 17 Feb 2006) $ $Id: RichtexteditorGetFoldersAndFilesResultTest.java 2199 2006-02-17 15:21:02Z tmjee $
13: */
14: public class RichtexteditorGetFoldersAndFilesResultTest extends
15: AbstractRichtexteditorTest {
16:
17: public void testExecuteResult() throws Exception {
18: invocation
19: .getStack()
20: .getContext()
21: .put(
22: "__richtexteditorGetFoldersAndFiles",
23: new AbstractRichtexteditorConnector.FoldersAndFiles(
24: new AbstractRichtexteditorConnector.Folder[] {
25: new AbstractRichtexteditorConnector.Folder(
26: "folder1"),
27: new AbstractRichtexteditorConnector.Folder(
28: "folder2"),
29: new AbstractRichtexteditorConnector.Folder(
30: "folder3") },
31: new AbstractRichtexteditorConnector.File[] {
32: new AbstractRichtexteditorConnector.File(
33: "file1.txt", 10),
34: new AbstractRichtexteditorConnector.File(
35: "file2.txt", 11),
36: new AbstractRichtexteditorConnector.File(
37: "file3.txt", 12) }));
38:
39: invocation.getStack().getContext().put(
40: "__richtexteditorCommand", "GetFoldersAndFiles");
41: invocation.getStack().getContext().put("__richtexteditorType",
42: "Image");
43: invocation.getStack().getContext().put(
44: "__richtexteditorFolderPath", "/path/");
45: invocation.getStack().getContext().put(
46: "__richtexteditorServerPath", "/server/path/");
47:
48: RichtexteditorGetFoldersAndFilesResult result = new RichtexteditorGetFoldersAndFilesResult();
49:
50: result.execute(invocation);
51:
52: verify(RichtexteditorGetFoldersAndFilesResultTest.class
53: .getResourceAsStream("RichtexteditorGetFoldersAndFilesResultTest1.txt"));
54: }
55: }
|