001: /* Copyright (C) 2004 - 2007 db4objects Inc. http://www.db4o.com
002:
003: This file is part of the db4o open source object database.
004:
005: db4o is free software; you can redistribute it and/or modify it under
006: the terms of version 2 of the GNU General Public License as published
007: by the Free Software Foundation and as clarified by db4objects' GPL
008: interpretation policy, available at
009: http://www.db4o.com/about/company/legalpolicies/gplinterpretation/
010: Alternatively you can write to db4objects, Inc., 1900 S Norfolk Street,
011: Suite 350, San Mateo, CA 94403, USA.
012:
013: db4o is distributed in the hope that it will be useful, but WITHOUT ANY
014: WARRANTY; without even the implied warranty of MERCHANTABILITY or
015: FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
016: for more details.
017:
018: You should have received a copy of the GNU General Public License along
019: with this program; if not, write to the Free Software Foundation, Inc.,
020: 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
021: package com.db4o.db4ounit.jre5.collections;
022:
023: import java.util.*;
024:
025: import com.db4o.collections.*;
026:
027: import db4ounit.*;
028:
029: public class SubArrayList4TestCase implements TestLifeCycle {
030:
031: List<Integer> _subList;
032:
033: public void setUp() throws Exception {
034: ArrayList4Asserter.CAPACITY = 100;
035: ArrayList4<Integer> list = new ArrayList4<Integer>();
036: ArrayList4Asserter.createList(list);
037: _subList = list.subList(0, 10);
038: ArrayList4Asserter.CAPACITY = 10;
039: }
040:
041: public void tearDown() throws Exception {
042: ArrayList4Asserter.CAPACITY = 100;
043: }
044:
045: public void testAdd() throws Exception {
046: ArrayList4Asserter.assertAdd(_subList);
047: }
048:
049: public void testAdd_LObject() throws Exception {
050: ArrayList4Asserter.assertAdd_LObject(_subList);
051: }
052:
053: public void testAddAll_LCollection() throws Exception {
054: ArrayList4Asserter.assertAddAll_LCollection(_subList);
055: }
056:
057: public void testClear() throws Exception {
058: ArrayList4Asserter.assertClear(_subList);
059: }
060:
061: public void testContains() throws Exception {
062: ArrayList4Asserter.assertContains(_subList);
063: }
064:
065: public void testContainsAll() throws Exception {
066: ArrayList4Asserter.assertContainsAll(_subList);
067: }
068:
069: public void testIndexOf() throws Exception {
070: ArrayList4Asserter.assertIndexOf(_subList);
071: }
072:
073: public void testIsEmpty() throws Exception {
074: ArrayList4Asserter.assertIsEmpty(_subList);
075: }
076:
077: public void testIterator() throws Exception {
078: ArrayList4Asserter.assertIterator(_subList);
079: }
080:
081: public void testLastIndexOf() throws Exception {
082: ArrayList4Asserter.assertLastIndexOf(_subList);
083: }
084:
085: public void testRemove_LObject() throws Exception {
086: ArrayList4Asserter.assertRemove_LObject(_subList);
087: }
088:
089: public void testRemoveAll() throws Exception {
090: ArrayList4Asserter.assertRemoveAll(_subList);
091: }
092:
093: public void testSet() throws Exception {
094: ArrayList4Asserter.assertSet(_subList);
095: }
096:
097: public void testSize() throws Exception {
098: ArrayList4Asserter.assertSize(_subList);
099: }
100:
101: public void testToArray() throws Exception {
102: ArrayList4Asserter.assertToArray(_subList);
103: }
104:
105: public void testToArray_LObject() throws Exception {
106: ArrayList4Asserter.assertToArray_LObject(_subList);
107: }
108:
109: public void testToString() throws Exception {
110: ArrayList4Asserter.assertToString(_subList);
111: }
112:
113: public void testTrimToSize_Remove() throws Exception {
114: ArrayList4Asserter.assertTrimToSize_Remove(_subList);
115: }
116:
117: public void testIteratorNext_NoSuchElementException()
118: throws Exception {
119: ArrayList4Asserter
120: .assertIteratorNext_NoSuchElementException(_subList);
121: }
122:
123: public void testIteratorNext_ConcurrentModificationException()
124: throws Exception {
125: ArrayList4Asserter
126: .assertIteratorNext_ConcurrentModificationException(_subList);
127: }
128:
129: public void testIteratorNext() throws Exception {
130: ArrayList4Asserter.assertIteratorNext(_subList);
131: }
132:
133: public void testIteratorRemove() throws Exception {
134: ArrayList4Asserter.assertIteratorRemove(_subList);
135: }
136:
137: public void testRemove_IllegalStateException() throws Exception {
138: ArrayList4Asserter.assertRemove_IllegalStateException(_subList);
139: }
140:
141: public void testIteratorRemove_ConcurrentModificationException()
142: throws Exception {
143: ArrayList4Asserter
144: .assertIteratorRemove_ConcurrentModificationException(_subList);
145: }
146:
147: public void testSubList() throws Exception {
148: ArrayList4Asserter.assertSubList(_subList);
149: }
150:
151: public void testSubList_ConcurrentModification() throws Exception {
152: ArrayList4Asserter
153: .assertSubList_ConcurrentModification(_subList);
154: }
155:
156: }
|