001: /* ====================================================================
002: The Jicarilla Software License
003:
004: Copyright (c) 2003 Leo Simons.
005: All rights reserved.
006:
007: Permission is hereby granted, free of charge, to any person obtaining
008: a copy of this software and associated documentation files (the
009: "Software"), to deal in the Software without restriction, including
010: without limitation the rights to use, copy, modify, merge, publish,
011: distribute, sublicense, and/or sell copies of the Software, and to
012: permit persons to whom the Software is furnished to do so, subject to
013: the following conditions:
014:
015: The above copyright notice and this permission notice shall be
016: included in all copies or substantial portions of the Software.
017:
018: THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
019: EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
020: MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
021: IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
022: CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
023: TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
024: SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
025: ==================================================================== */
026: package org.jicarilla.collections.test;
027:
028: import org.jicarilla.collections.Node;
029: import junit.framework.TestCase;
030:
031: import java.util.Collection;
032: import java.util.Iterator;
033: import java.util.List;
034: import java.util.Map;
035: import java.util.Set;
036:
037: /**
038: * @author <a href="lsimons at jicarilla dot org">Leo Simons</a>
039: * @version $Id: NodeTestCase.java,v 1.3 2004/02/26 16:51:54 lsimons Exp $
040: */
041: public class NodeTestCase extends TestCase {
042: public void testImplementation() {
043: assertNotNull(new Node() {
044: public int hashCode() {
045: return 0;
046: }
047:
048: public boolean containsKey(final Object key) {
049: return false;
050: }
051:
052: public boolean containsValue(final Object value) {
053: return false;
054: }
055:
056: public boolean equals(final Object o) {
057: return false;
058: }
059:
060: public Collection values() {
061: return null;
062: }
063:
064: public void putAll(final Map t) {
065: }
066:
067: public Set entrySet() {
068: return null;
069: }
070:
071: public Set keySet() {
072: return null;
073: }
074:
075: public Object get(final Object key) {
076: return null;
077: }
078:
079: public Object remove(final Object key) {
080: return null;
081: }
082:
083: public Object put(final Object key, final Object value) {
084: return null;
085: }
086:
087: public String getName() {
088: return null;
089: }
090:
091: public String setName(final String s) {
092: return null;
093: }
094:
095: public Object getContents() {
096: return null;
097: }
098:
099: public Object setContents(final Object o) {
100: return null;
101: }
102:
103: // override Map
104: public boolean isEmpty() {
105: return false;
106: }
107:
108: public void clear() {
109: }
110:
111: public int size() {
112: return 0;
113: }
114:
115: // List
116: public boolean addChild(final Node n) {
117: return false;
118: }
119:
120: public boolean addChildren(final Collection c) {
121: return false;
122: }
123:
124: public boolean containsChild(final Node n) {
125: return false;
126: }
127:
128: public boolean containsChildren(final Collection c) {
129: return false;
130: }
131:
132: public Iterator iterator() {
133: return null;
134: }
135:
136: public boolean removeChild(final Node n) {
137: return false;
138: }
139:
140: public boolean removeChildren(final Collection c) {
141: return false;
142: }
143:
144: public Node[] childrenToArray() {
145: return new Node[0];
146: }
147:
148: public Node[] childrenToArray(final Object[] o) {
149: return new Node[0];
150: }
151:
152: public List childrenToList() {
153: return null;
154: }
155:
156: });
157: }
158: }
|