Return-Path: Delivered-To: apmail-cayenne-dev-archive@www.apache.org Received: (qmail 14296 invoked from network); 5 Sep 2007 01:56:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Sep 2007 01:56:14 -0000 Received: (qmail 2703 invoked by uid 500); 5 Sep 2007 01:56:09 -0000 Delivered-To: apmail-cayenne-dev-archive@cayenne.apache.org Received: (qmail 2685 invoked by uid 500); 5 Sep 2007 01:56:09 -0000 Mailing-List: contact dev-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cayenne.apache.org Delivered-To: mailing list dev@cayenne.apache.org Received: (qmail 2676 invoked by uid 500); 5 Sep 2007 01:56:09 -0000 Delivered-To: apmail-incubator-cayenne-dev@incubator.apache.org Received: (qmail 2673 invoked by uid 99); 5 Sep 2007 01:56:09 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Sep 2007 18:56:09 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Sep 2007 01:57:28 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 80797714208 for ; Tue, 4 Sep 2007 18:55:51 -0700 (PDT) Message-ID: <7167397.1188957351521.JavaMail.jira@brutus> Date: Tue, 4 Sep 2007 18:55:51 -0700 (PDT) From: "Marcin Skladaniec (JIRA)" To: cayenne-dev@incubator.apache.org Subject: [JIRA] Created: (CAY-862) Simplify (junit) testing in cayenne MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Simplify (junit) testing in cayenne ----------------------------------- Key: CAY-862 URL: https://issues.apache.org/cayenne/browse/CAY-862 Project: Cayenne Issue Type: New Feature Components: Cayenne Core Library Affects Versions: 3.0 Environment: All Reporter: Marcin Skladaniec Assignee: Andrus Adamchik Junit tests are becoming very important once the project reaches a certain point. Cayenne has dozens of junit tests but writing a junit test for cayenne based application is not easy at all. For me the main trouble is when there is no need to fetch or commit something (like testing GUI or lifecycle events). I tried to reproduce the tests found in cayenne,but always ended up with problems with mocking up the context, datachannel, entityResolver, altering the configuration to point to different db etc. To solve that my idea was that one might specify a package in the CayenneModeler, this package will than be populated with generated a set of _MockupXXX extends XXX (like _MockupArtist extends Artist, _MockupPainting extends Painting etc.) and a MockupDataContext etc. There could be a second set of _MockupEntities for ROP client. Another thing is to specify the testing environment with ease. I think there should be also a possibility to create a "testing" DataNode pointing to a different database than deployment, and for the DataMap could be related to the real or testing DataNode at the same time. To choose the testing environment a system param like -Dcayenne.testing=TRUE could be utilised. I might have missed something here: is there a simply way of having two DataNodes for one DataMap ? I think that simplified testcase writing feature would be a great advantage for Cayenne over any other ORM. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.