01: /*
02: * Copyright (C) 2006 Methodhead Software LLC. All rights reserved.
03: *
04: * This file is part of TransferCM.
05: *
06: * TransferCM is free software; you can redistribute it and/or modify it under the
07: * terms of the GNU General Public License as published by the Free Software
08: * Foundation; either version 2 of the License, or (at your option) any later
09: * version.
10: *
11: * TransferCM is distributed in the hope that it will be useful, but WITHOUT ANY
12: * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13: * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
14: * details.
15: *
16: * You should have received a copy of the GNU General Public License along with
17: * TransferCM; if not, write to the Free Software Foundation, Inc., 51 Franklin St,
18: * Fifth Floor, Boston, MA 02110-1301 USA
19: */
20:
21: package com.methodhead.tree;
22:
23: import java.util.*;
24: import junit.framework.*;
25: import org.apache.log4j.*;
26: import com.methodhead.persistable.*;
27: import com.methodhead.test.*;
28:
29: public class FoldingTreeNodeTest extends DbTestCase {
30:
31: public FoldingTreeNodeTest(String name) {
32: super (name);
33: }
34:
35: protected void setUp() {
36: //setLogLevel( Level.DEBUG );
37: try {
38: } catch (Exception e) {
39: fail(e.getMessage());
40: }
41: }
42:
43: protected void tearDown() {
44: }
45:
46: public void testConstructor() {
47: try {
48: FoldingTreeNode node = new FoldingTreeNode();
49:
50: assertEquals("", node.getLabel());
51: assertNull(node.getUrl());
52: assertNull(node.getIconHint());
53: assertTrue(!node.getOpened());
54: } catch (Exception e) {
55: e.printStackTrace();
56: fail();
57: }
58: }
59:
60: public void testProperties() {
61: try {
62: FoldingTreeNode node = new FoldingTreeNode();
63: node.setLabel("label");
64: node.setUrl("url");
65: node.setIconHint("iconHint");
66: node.setOpened(true);
67:
68: assertEquals("label", node.getLabel());
69: assertEquals("url", node.getUrl());
70: assertEquals("iconHint", node.getIconHint());
71: assertTrue(node.getOpened());
72: } catch (Exception e) {
73: e.printStackTrace();
74: fail();
75: }
76: }
77: }
|