Return-Path: Delivered-To: apmail-commons-dev-archive@www.apache.org Received: (qmail 73939 invoked from network); 13 Oct 2010 14:36:56 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 13 Oct 2010 14:36:56 -0000 Received: (qmail 72074 invoked by uid 500); 13 Oct 2010 14:36:55 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 71934 invoked by uid 500); 13 Oct 2010 14:36:54 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 71926 invoked by uid 99); 13 Oct 2010 14:36:53 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Oct 2010 14:36:53 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of simone.tripodi@gmail.com designates 74.125.82.171 as permitted sender) Received: from [74.125.82.171] (HELO mail-wy0-f171.google.com) (74.125.82.171) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Oct 2010 14:36:46 +0000 Received: by wya21 with SMTP id 21so3415674wya.30 for ; Wed, 13 Oct 2010 07:36:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=546aHZA23rC98JQHPRJniY9OFul7yMyNjPsuXkIYa5Q=; b=XrgkhutjJwGNiX5KwxtxssSTdedvep+KDafSg6qkj2CBew8GkmEP+45k9CDCWQiG3u 0VhcucwHK2oT+/A8w2NuIwHcay5UFUmR4dwCyvhOYxZH53gGA9wTojcEnLMDUV6I9wKl PkTjFysXVTpsX8seVuo82JakJ27OUZLjxdOK8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=jh2tTrelm6ri7hZrUWBVIbL5cmScOTyiuuBNINI9xwaWyZQK6wJbYL9yQZANgF3W5i 31pPCDFkyV2yxaiEHldtb9yna7+0p2Rlt6SFzz+trWOk6nEbzRCF7N7dkztRWE5VfHJG jzgLm1EgJtKMM1sx21J/TCLLlNF9xlS75VXD8= MIME-Version: 1.0 Received: by 10.216.73.7 with SMTP id u7mr47524wed.54.1286980585217; Wed, 13 Oct 2010 07:36:25 -0700 (PDT) Received: by 10.216.36.195 with HTTP; Wed, 13 Oct 2010 07:36:25 -0700 (PDT) In-Reply-To: <20101013124602.4F00423889E0@eris.apache.org> References: <20101013124602.4F00423889E0@eris.apache.org> Date: Wed, 13 Oct 2010 16:36:25 +0200 Message-ID: Subject: Re: svn commit: r1022080 - /commons/proper/pool/trunk/src/test/org/apache/commons/pool/impl/TestCursorableLinkedList.java From: Simone Tripodi To: dev@commons.apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Hi all guys, Pool 1.X was using junit 3.8.1 for unit tests because of the Java1.3 retro compatibility, this test broke the build because junit 4.X is missing in the classpath, so I'd take advantage and migrate to junit 4, any abjection? just let me know, Simo http://people.apache.org/~simonetripodi/ http://www.99soft.org/ On Wed, Oct 13, 2010 at 2:46 PM, wrote: > Author: sebb > Date: Wed Oct 13 12:46:01 2010 > New Revision: 1022080 > > URL: http://svn.apache.org/viewvc?rev=3D1022080&view=3Drev > Log: > Add basic tests for CursorableLinkedList > > Added: > =C2=A0 =C2=A0commons/proper/pool/trunk/src/test/org/apache/commons/pool/i= mpl/TestCursorableLinkedList.java =C2=A0 (with props) > > Added: commons/proper/pool/trunk/src/test/org/apache/commons/pool/impl/Te= stCursorableLinkedList.java > URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/test/org/= apache/commons/pool/impl/TestCursorableLinkedList.java?rev=3D1022080&view= =3Dauto > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- commons/proper/pool/trunk/src/test/org/apache/commons/pool/impl/TestC= ursorableLinkedList.java (added) > +++ commons/proper/pool/trunk/src/test/org/apache/commons/pool/impl/TestC= ursorableLinkedList.java Wed Oct 13 12:46:01 2010 > @@ -0,0 +1,271 @@ > +/* > + * Licensed to the Apache Software Foundation (ASF) under one or more > + * contributor license agreements. =C2=A0See the NOTICE file distributed= with > + * this work for additional information regarding copyright ownership. > + * The ASF licenses this file to You under the Apache License, Version 2= .0 > + * (the "License"); you may not use this file except in compliance with > + * the License. =C2=A0You may obtain a copy of the License at > + * > + * =C2=A0 http://www.apache.org/licenses/LICENSE-2.0 > + * > + * Unless required by applicable law or agreed to in writing, software > + * distributed under the License is distributed on an "AS IS" BASIS, > + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or impli= ed. > + * See the License for the specific language governing permissions and > + * limitations under the License. > + * > + */ > + > +package org.apache.commons.pool.impl; > + > +import static org.junit.Assert.*; > + > +import org.junit.Test; > + > +public class TestCursorableLinkedList { > + > +// =C2=A0 =C2=A0@Test > +// =C2=A0 =C2=A0public void testHashCode() { > +// =C2=A0 =C2=A0 =C2=A0 =C2=A0// fail("Not yet implemented"); > +// =C2=A0 =C2=A0} > +// > +// =C2=A0 =C2=A0@Test > +// =C2=A0 =C2=A0public void testAddT() { > +// =C2=A0 =C2=A0 =C2=A0 =C2=A0// fail("Not yet implemented"); > +// =C2=A0 =C2=A0} > +// > +// =C2=A0 =C2=A0@Test > +// =C2=A0 =C2=A0public void testAddIntT() { > +// =C2=A0 =C2=A0 =C2=A0 =C2=A0// fail("Not yet implemented"); > +// =C2=A0 =C2=A0} > +// > +// =C2=A0 =C2=A0@Test > +// =C2=A0 =C2=A0public void testAddAllCollectionOfQextendsT() { > +// =C2=A0 =C2=A0 =C2=A0 =C2=A0// fail("Not yet implemented"); > +// =C2=A0 =C2=A0} > +// > +// =C2=A0 =C2=A0@Test > +// =C2=A0 =C2=A0public void testAddAllIntCollectionOfQextendsT() { > +// =C2=A0 =C2=A0 =C2=A0 =C2=A0// fail("Not yet implemented"); > +// =C2=A0 =C2=A0} > +// > +// =C2=A0 =C2=A0@Test > +// =C2=A0 =C2=A0public void testAddFirst() { > +// =C2=A0 =C2=A0 =C2=A0 =C2=A0// fail("Not yet implemented"); > +// =C2=A0 =C2=A0} > +// > +// =C2=A0 =C2=A0@Test > +// =C2=A0 =C2=A0public void testAddLast() { > +// =C2=A0 =C2=A0 =C2=A0 =C2=A0// fail("Not yet implemented"); > +// =C2=A0 =C2=A0} > +// > +// =C2=A0 =C2=A0@Test > +// =C2=A0 =C2=A0public void testClear() { > +// =C2=A0 =C2=A0 =C2=A0 =C2=A0// fail("Not yet implemented"); > +// =C2=A0 =C2=A0} > +// > +// =C2=A0 =C2=A0@Test > +// =C2=A0 =C2=A0public void testContains() { > +// =C2=A0 =C2=A0 =C2=A0 =C2=A0// fail("Not yet implemented"); > +// =C2=A0 =C2=A0} > +// > +// =C2=A0 =C2=A0@Test > +// =C2=A0 =C2=A0public void testContainsAll() { > +// =C2=A0 =C2=A0 =C2=A0 =C2=A0// fail("Not yet implemented"); > +// =C2=A0 =C2=A0} > +// > +// =C2=A0 =C2=A0@Test > +// =C2=A0 =C2=A0public void testCursor() { > +// =C2=A0 =C2=A0 =C2=A0 =C2=A0// fail("Not yet implemented"); > +// =C2=A0 =C2=A0} > +// > +// =C2=A0 =C2=A0@Test > +// =C2=A0 =C2=A0public void testCursorInt() { > +// =C2=A0 =C2=A0 =C2=A0 =C2=A0// fail("Not yet implemented"); > +// =C2=A0 =C2=A0} > +// > +// =C2=A0 =C2=A0@Test > +// =C2=A0 =C2=A0public void testEqualsObject() { > +// =C2=A0 =C2=A0 =C2=A0 =C2=A0// fail("Not yet implemented"); > +// =C2=A0 =C2=A0} > +// > +// =C2=A0 =C2=A0@Test > +// =C2=A0 =C2=A0public void testGet() { > +// =C2=A0 =C2=A0 =C2=A0 =C2=A0// fail("Not yet implemented"); > +// =C2=A0 =C2=A0} > +// > +// =C2=A0 =C2=A0@Test > +// =C2=A0 =C2=A0public void testGetFirst() { > +// =C2=A0 =C2=A0 =C2=A0 =C2=A0// fail("Not yet implemented"); > +// =C2=A0 =C2=A0} > +// > +// =C2=A0 =C2=A0@Test > +// =C2=A0 =C2=A0public void testGetLast() { > +// =C2=A0 =C2=A0 =C2=A0 =C2=A0// fail("Not yet implemented"); > +// =C2=A0 =C2=A0} > +// > +// =C2=A0 =C2=A0@Test > +// =C2=A0 =C2=A0public void testIndexOf() { > +// =C2=A0 =C2=A0 =C2=A0 =C2=A0// fail("Not yet implemented"); > +// =C2=A0 =C2=A0} > +// > +// =C2=A0 =C2=A0@Test > +// =C2=A0 =C2=A0public void testIsEmpty() { > +// =C2=A0 =C2=A0 =C2=A0 =C2=A0// fail("Not yet implemented"); > +// =C2=A0 =C2=A0} > +// > +// =C2=A0 =C2=A0@Test > +// =C2=A0 =C2=A0public void testIterator() { > +// =C2=A0 =C2=A0 =C2=A0 =C2=A0// fail("Not yet implemented"); > +// =C2=A0 =C2=A0} > +// > +// =C2=A0 =C2=A0@Test > +// =C2=A0 =C2=A0public void testLastIndexOf() { > +// =C2=A0 =C2=A0 =C2=A0 =C2=A0// fail("Not yet implemented"); > +// =C2=A0 =C2=A0} > +// > +// =C2=A0 =C2=A0@Test > +// =C2=A0 =C2=A0public void testListIterator() { > +// =C2=A0 =C2=A0 =C2=A0 =C2=A0// fail("Not yet implemented"); > +// =C2=A0 =C2=A0} > +// > +// =C2=A0 =C2=A0@Test > +// =C2=A0 =C2=A0public void testListIteratorInt() { > +// =C2=A0 =C2=A0 =C2=A0 =C2=A0// fail("Not yet implemented"); > +// =C2=A0 =C2=A0} > +// > +// =C2=A0 =C2=A0@Test > +// =C2=A0 =C2=A0public void testRemoveObject() { > +// =C2=A0 =C2=A0 =C2=A0 =C2=A0// fail("Not yet implemented"); > +// =C2=A0 =C2=A0} > +// > +// =C2=A0 =C2=A0@Test > +// =C2=A0 =C2=A0public void testRemoveInt() { > +// =C2=A0 =C2=A0 =C2=A0 =C2=A0// fail("Not yet implemented"); > +// =C2=A0 =C2=A0} > +// > +// =C2=A0 =C2=A0@Test > +// =C2=A0 =C2=A0public void testRemoveAll() { > +// =C2=A0 =C2=A0 =C2=A0 =C2=A0// fail("Not yet implemented"); > +// =C2=A0 =C2=A0} > +// > +// =C2=A0 =C2=A0@Test > +// =C2=A0 =C2=A0public void testRemoveFirst() { > +// =C2=A0 =C2=A0 =C2=A0 =C2=A0// fail("Not yet implemented"); > +// =C2=A0 =C2=A0} > +// > +// =C2=A0 =C2=A0@Test > +// =C2=A0 =C2=A0public void testRemoveLast() { > +// =C2=A0 =C2=A0 =C2=A0 =C2=A0// fail("Not yet implemented"); > +// =C2=A0 =C2=A0} > +// > +// =C2=A0 =C2=A0@Test > +// =C2=A0 =C2=A0public void testRetainAll() { > +// =C2=A0 =C2=A0 =C2=A0 =C2=A0// fail("Not yet implemented"); > +// =C2=A0 =C2=A0} > +// > +// =C2=A0 =C2=A0@Test > +// =C2=A0 =C2=A0public void testSet() { > +// =C2=A0 =C2=A0 =C2=A0 =C2=A0// fail("Not yet implemented"); > +// =C2=A0 =C2=A0} > +// > +// =C2=A0 =C2=A0@Test > +// =C2=A0 =C2=A0public void testSize() { > +// =C2=A0 =C2=A0 =C2=A0 =C2=A0// fail("Not yet implemented"); > +// =C2=A0 =C2=A0} > + > + =C2=A0 =C2=A0@Test > + =C2=A0 =C2=A0public void testToArray() { > + =C2=A0 =C2=A0 =C2=A0 =C2=A0CursorableLinkedList cll =3D new Cu= rsorableLinkedList(); > + =C2=A0 =C2=A0 =C2=A0 =C2=A0cll.add(Integer.valueOf(1)); > + =C2=A0 =C2=A0 =C2=A0 =C2=A0cll.add(Integer.valueOf(2)); > + =C2=A0 =C2=A0 =C2=A0 =C2=A0Object[] oa; > + =C2=A0 =C2=A0 =C2=A0 =C2=A0oa =3D cll.toArray(); > + =C2=A0 =C2=A0 =C2=A0 =C2=A0assertEquals(cll.size(),oa.length); > + =C2=A0 =C2=A0 =C2=A0 =C2=A0assertNotNull(oa[0]); > + =C2=A0 =C2=A0 =C2=A0 =C2=A0assertEquals("java.lang.Integer",oa[0].getCl= ass().getCanonicalName()); > + =C2=A0 =C2=A0} > + > + =C2=A0 =C2=A0@Test > + =C2=A0 =C2=A0public void testToArrayEArray() { > + =C2=A0 =C2=A0 =C2=A0 =C2=A0CursorableLinkedList cll =3D new Cu= rsorableLinkedList(); > + =C2=A0 =C2=A0 =C2=A0 =C2=A0cll.add(Integer.valueOf(1)); > + =C2=A0 =C2=A0 =C2=A0 =C2=A0cll.add(Integer.valueOf(2)); > + =C2=A0 =C2=A0 =C2=A0 =C2=A0Integer[] ia; > + =C2=A0 =C2=A0 =C2=A0 =C2=A0ia =3D cll.toArray(new Integer[0]); > + =C2=A0 =C2=A0 =C2=A0 =C2=A0assertEquals(cll.size(),ia.length); > + =C2=A0 =C2=A0 =C2=A0 =C2=A0ia =3D cll.toArray(new Integer[10]); > + =C2=A0 =C2=A0 =C2=A0 =C2=A0assertEquals(10,ia.length); > + =C2=A0 =C2=A0 =C2=A0 =C2=A0assertNotNull(ia[0]); > + =C2=A0 =C2=A0 =C2=A0 =C2=A0assertNull(ia[cll.size()]); > + =C2=A0 =C2=A0 =C2=A0 =C2=A0try { > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0cll.toArray(new String[0]); > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0fail("Should have generated Ar= rayStoreException"); > + =C2=A0 =C2=A0 =C2=A0 =C2=A0} catch (ArrayStoreException expected){ > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0// expected > + =C2=A0 =C2=A0 =C2=A0 =C2=A0} > + =C2=A0 =C2=A0 =C2=A0 =C2=A0cll.toArray(new Number[0]); > + =C2=A0 =C2=A0 =C2=A0 =C2=A0try { > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0cll.toArray(null); > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0fail("Should have generated Nu= llPointerException"); > + =C2=A0 =C2=A0 =C2=A0 =C2=A0} catch (NullPointerException expected){ > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0// expected > + =C2=A0 =C2=A0 =C2=A0 =C2=A0} > + =C2=A0 =C2=A0} > + > +// =C2=A0 =C2=A0@Test > +// =C2=A0 =C2=A0public void testToString() { > +// =C2=A0 =C2=A0 =C2=A0 =C2=A0// fail("Not yet implemented"); > +// =C2=A0 =C2=A0} > +// > +// =C2=A0 =C2=A0@Test > +// =C2=A0 =C2=A0public void testSubList() { > +// =C2=A0 =C2=A0 =C2=A0 =C2=A0// fail("Not yet implemented"); > +// =C2=A0 =C2=A0} > +// > +// =C2=A0 =C2=A0@Test > +// =C2=A0 =C2=A0public void testInsertListable() { > +// =C2=A0 =C2=A0 =C2=A0 =C2=A0// fail("Not yet implemented"); > +// =C2=A0 =C2=A0} > +// > +// =C2=A0 =C2=A0@Test > +// =C2=A0 =C2=A0public void testRemoveListable() { > +// =C2=A0 =C2=A0 =C2=A0 =C2=A0// fail("Not yet implemented"); > +// =C2=A0 =C2=A0} > +// > +// =C2=A0 =C2=A0@Test > +// =C2=A0 =C2=A0public void testGetListableAt() { > +// =C2=A0 =C2=A0 =C2=A0 =C2=A0// fail("Not yet implemented"); > +// =C2=A0 =C2=A0} > +// > +// =C2=A0 =C2=A0@Test > +// =C2=A0 =C2=A0public void testRegisterCursor() { > +// =C2=A0 =C2=A0 =C2=A0 =C2=A0// fail("Not yet implemented"); > +// =C2=A0 =C2=A0} > +// > +// =C2=A0 =C2=A0@Test > +// =C2=A0 =C2=A0public void testUnregisterCursor() { > +// =C2=A0 =C2=A0 =C2=A0 =C2=A0// fail("Not yet implemented"); > +// =C2=A0 =C2=A0} > +// > +// =C2=A0 =C2=A0@Test > +// =C2=A0 =C2=A0public void testInvalidateCursors() { > +// =C2=A0 =C2=A0 =C2=A0 =C2=A0// fail("Not yet implemented"); > +// =C2=A0 =C2=A0} > +// > +// =C2=A0 =C2=A0@Test > +// =C2=A0 =C2=A0public void testBroadcastListableChanged() { > +// =C2=A0 =C2=A0 =C2=A0 =C2=A0// fail("Not yet implemented"); > +// =C2=A0 =C2=A0} > +// > +// =C2=A0 =C2=A0@Test > +// =C2=A0 =C2=A0public void testBroadcastListableRemoved() { > +// =C2=A0 =C2=A0 =C2=A0 =C2=A0// fail("Not yet implemented"); > +// =C2=A0 =C2=A0} > +// > +// =C2=A0 =C2=A0@Test > +// =C2=A0 =C2=A0public void testBroadcastListableInserted() { > +// =C2=A0 =C2=A0 =C2=A0 =C2=A0// fail("Not yet implemented"); > +// =C2=A0 =C2=A0} > + > +} > > Propchange: commons/proper/pool/trunk/src/test/org/apache/commons/pool/im= pl/TestCursorableLinkedList.java > -------------------------------------------------------------------------= ----- > =C2=A0 =C2=A0svn:eol-style =3D native > > Propchange: commons/proper/pool/trunk/src/test/org/apache/commons/pool/im= pl/TestCursorableLinkedList.java > -------------------------------------------------------------------------= ----- > =C2=A0 =C2=A0svn:keywords =3D Author Date Id Revision > > > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org