Return-Path: Delivered-To: apmail-db-ojb-dev-archive@db.apache.org Received: (qmail 62496 invoked by uid 500); 11 Jul 2003 07:43:56 -0000 Mailing-List: contact ojb-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "OJB Developers List" Reply-To: "OJB Developers List" Delivered-To: mailing list ojb-dev@db.apache.org Received: (qmail 62456 invoked by uid 500); 11 Jul 2003 07:43:56 -0000 Received: (qmail 62428 invoked from network); 11 Jul 2003 07:43:55 -0000 Received: from icarus.apache.org (208.185.179.13) by daedalus.apache.org with SMTP; 11 Jul 2003 07:43:55 -0000 Received: (qmail 74194 invoked by uid 1510); 11 Jul 2003 07:43:54 -0000 Date: 11 Jul 2003 07:43:54 -0000 Message-ID: <20030711074354.74193.qmail@icarus.apache.org> From: arminw@apache.org To: db-ojb-cvs@apache.org Subject: cvs commit: db-ojb/src/test/org/apache/ojb/broker NestedFieldsTest.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N arminw 2003/07/11 00:43:54 Modified: src/test/org/apache/ojb repository_junit.xml src/test/org/apache/ojb/broker NestedFieldsTest.java Log: rename field/method names Revision Changes Path 1.80 +2 -2 db-ojb/src/test/org/apache/ojb/repository_junit.xml Index: repository_junit.xml =================================================================== RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/repository_junit.xml,v retrieving revision 1.79 retrieving revision 1.80 diff -u -r1.79 -r1.80 --- repository_junit.xml 8 Jul 2003 00:34:54 -0000 1.79 +++ repository_junit.xml 11 Jul 2003 07:43:53 -0000 1.80 @@ -4406,13 +4406,13 @@ /> 1.3 +28 -28 db-ojb/src/test/org/apache/ojb/broker/NestedFieldsTest.java Index: NestedFieldsTest.java =================================================================== RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/broker/NestedFieldsTest.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- NestedFieldsTest.java 8 Jul 2003 00:34:54 -0000 1.2 +++ NestedFieldsTest.java 11 Jul 2003 07:43:53 -0000 1.3 @@ -60,29 +60,29 @@ broker.store(nested); broker.commitTransaction(); - assertNotNull(nested.getDetail()); - assertNotNull(nested.getDetail().getDetail()); - assertNotNull(nested.getDetail().getDetail().getRealDetailName()); - dd = nested.getDetail().getDetail(); + assertNotNull(nested.getNestedDetail()); + assertNotNull(nested.getNestedDetail().getNestedDetailDetail()); + assertNotNull(nested.getNestedDetail().getNestedDetailDetail().getRealDetailName()); + dd = nested.getNestedDetail().getNestedDetailDetail(); assertEquals(ddName, dd.getRealDetailName()); assertEquals(ddDescription, dd.getRealDetailDescription()); // retrieve copy of nested object NestedMain nestedCopy = (NestedMain) broker.getObjectByIdentity(oid); - assertNotNull(nestedCopy.getDetail()); - assertNotNull(nestedCopy.getDetail().getDetail()); - assertNotNull(nestedCopy.getDetail().getDetail().getRealDetailName()); - dd = nested.getDetail().getDetail(); + assertNotNull(nestedCopy.getNestedDetail()); + assertNotNull(nestedCopy.getNestedDetail().getNestedDetailDetail()); + assertNotNull(nestedCopy.getNestedDetail().getNestedDetailDetail().getRealDetailName()); + dd = nested.getNestedDetail().getNestedDetailDetail(); assertEquals(ddName, dd.getRealDetailName()); assertEquals(ddDescription, dd.getRealDetailDescription()); // clear cache and retrieve copy of nested object broker.clearCache(); nestedCopy = (NestedMain) broker.getObjectByIdentity(oid); - assertNotNull(nestedCopy.getDetail()); - assertNotNull(nestedCopy.getDetail().getDetail()); - assertNotNull(nestedCopy.getDetail().getDetail().getRealDetailName()); - dd = nested.getDetail().getDetail(); + assertNotNull(nestedCopy.getNestedDetail()); + assertNotNull(nestedCopy.getNestedDetail().getNestedDetailDetail()); + assertNotNull(nestedCopy.getNestedDetail().getNestedDetailDetail().getRealDetailName()); + dd = nested.getNestedDetail().getNestedDetailDetail(); assertEquals(ddName, dd.getRealDetailName()); assertEquals(ddDescription, dd.getRealDetailDescription()); } @@ -110,7 +110,7 @@ till now we do the same as in the test above now change nested field and store */ - nested.getDetail().getDetail().setRealDetailName("update_name_"+timestamp); + nested.getNestedDetail().getNestedDetailDetail().setRealDetailName("update_name_"+timestamp); broker.beginTransaction(); broker.store(nested); broker.commitTransaction(); @@ -118,7 +118,7 @@ // clear cache and retrieve copy of nested object broker.clearCache(); nested = (NestedMain) broker.getObjectByIdentity(oid); - assertEquals("update_name_"+timestamp, nested.getDetail().getDetail().getRealDetailName()); + assertEquals("update_name_"+timestamp, nested.getNestedDetail().getNestedDetailDetail().getRealDetailName()); } public void testDeleteNestedField() @@ -158,7 +158,7 @@ { private Long objId; private String name; - private NestedDetail detail; + private NestedDetail nestedDetail; public NestedMain() { @@ -167,7 +167,7 @@ public NestedMain(String name, NestedDetail detail) { this.name = name; - this.detail = detail; + this.nestedDetail = detail; } public Long getObjId() @@ -190,14 +190,14 @@ this.name = name; } - public NestedDetail getDetail() + public NestedDetail getNestedDetail() { - return detail; + return nestedDetail; } - public void setDetail(NestedDetail detail) + public void setNestedDetail(NestedDetail nestedDetail) { - this.detail = detail; + this.nestedDetail = nestedDetail; } public String toString() @@ -205,14 +205,14 @@ ToStringBuilder buf = new ToStringBuilder(this, ToStringStyle.DEFAULT_STYLE); buf.append("objId", objId). append("name", name). - append("detail", detail); + append("detail", nestedDetail); return buf.toString(); } } public static class NestedDetail { - private NestedDetailDetail detail; + private NestedDetailDetail nestedDetailDetail; public NestedDetail() { @@ -220,23 +220,23 @@ public NestedDetail(NestedDetailDetail detail) { - this.detail = detail; + this.nestedDetailDetail = detail; } - public NestedDetailDetail getDetail() + public NestedDetailDetail getNestedDetailDetail() { - return detail; + return nestedDetailDetail; } - public void setDetail(NestedDetailDetail detail) + public void setNestedDetailDetail(NestedDetailDetail nestedDetailDetail) { - this.detail = detail; + this.nestedDetailDetail = nestedDetailDetail; } public String toString() { ToStringBuilder buf = new ToStringBuilder(this, ToStringStyle.SIMPLE_STYLE); - buf.append("detail", detail); + buf.append("detail", nestedDetailDetail); return buf.toString(); } } --------------------------------------------------------------------- To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org For additional commands, e-mail: ojb-dev-help@db.apache.org