01: package edu.iu.uis.eden.services.docelements;
02:
03: import edu.iu.uis.eden.services.IDocElement;
04:
05: /**
06: *
07: * <p>Title: TestDescriptionElement</p>
08: * <p>Description: Just about everything in the DescriptionElement test
09: * is covered in the Test for generic String</p>
10: * <p>Copyright: Copyright (c) 2002</p>
11: * <p>Company: Indiana University</p>
12: * @author Ryan Kirkendall
13: * @version 1.0
14: */
15: public class TestDescriptionElement extends IDocInterfaceTestTemplate {
16: private DescriptionElement description;
17:
18: public TestDescriptionElement(String s) {
19: super (s);
20: }
21:
22: protected void setUp() {
23: description = new DescriptionElement();
24: }
25:
26: protected void tearDown() {
27: }
28:
29: public IDocElement getIDocElement() {
30: return this .description;
31: }
32:
33: /**
34: * no it isn't
35: */
36: public void testIsRouteControl() {
37: assertEquals("Description element is not a routeControl",
38: false, this .description.isRouteControl());
39:
40: //try to set true and retest
41: this .description.setRouteControl(true);
42: assertEquals("Description element is not a routeControl",
43: false, this .description.isRouteControl());
44: }
45:
46: /**
47: * always valid
48: */
49: public void testValidate() {
50: try {
51: assertNull("Description element is always valid",
52: this .description.validate());
53:
54: //set and recheck
55: this .description.setDescription("a description");
56: assertNull("Description element is always valid",
57: this .description.validate());
58: } catch (Exception ex) {
59: fail("threw exception validating");
60: }
61: }
62: }
63:
64: /*
65: * Copyright 2003 The Trustees of Indiana University. All rights reserved.
66: *
67: * This file is part of the EDEN software package.
68: * For license information, see the LICENSE file in the top level directory
69: * of the EDEN source distribution.
70: */
|