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: * Test case for RichtexteditorGetFoldersResultTest.
11: *
12: * @author tm_jee
13: * @version $Date: 2006-02-17 16:21:02 +0100 (Fri, 17 Feb 2006) $ $Id: RichtexteditorGetFoldersResultTest.java 2199 2006-02-17 15:21:02Z tmjee $
14: */
15: public class RichtexteditorGetFoldersResultTest extends
16: AbstractRichtexteditorTest {
17:
18: public void testExecuteResult() throws Exception {
19: invocation.getStack().getContext().put(
20: "__richtexteditorGetFolders",
21: new AbstractRichtexteditorConnector.Folder[] {
22: new AbstractRichtexteditorConnector.Folder(
23: "folder1"),
24: new AbstractRichtexteditorConnector.Folder(
25: "folder2"),
26: new AbstractRichtexteditorConnector.Folder(
27: "folder3") });
28: invocation.getStack().getContext().put(
29: "__richtexteditorCommand", "GetFolders");
30: invocation.getStack().getContext().put("__richtexteditorType",
31: "Image");
32: invocation.getStack().getContext().put(
33: "__richtexteditorFolderPath", "/path/");
34: invocation.getStack().getContext().put(
35: "__richtexteditorServerPath", "/server/path/");
36:
37: RichtexteditorGetFoldersResult result = new RichtexteditorGetFoldersResult();
38: result.execute(invocation);
39:
40: verify(RichtexteditorGetFoldersResultTest.class
41: .getResourceAsStream("RichtexteditorGetFoldersResultTest1.txt"));
42: }
43: }
|