ibatis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cbe...@apache.org
Subject svn commit: r679240 - in /ibatis/trunk/java/jpetstore/jpetstore5: build/build.xml test/com/ibatis/jpetstore/persistence/DaoManagerTest.java
Date Thu, 24 Jul 2008 00:07:52 GMT
Author: cbegin
Date: Wed Jul 23 17:07:52 2008
New Revision: 679240

URL: http://svn.apache.org/viewvc?rev=679240&view=rev
Log:
added a test and improved build test failure notification

Added:
    ibatis/trunk/java/jpetstore/jpetstore5/test/com/ibatis/jpetstore/persistence/DaoManagerTest.java
Modified:
    ibatis/trunk/java/jpetstore/jpetstore5/build/build.xml

Modified: ibatis/trunk/java/jpetstore/jpetstore5/build/build.xml
URL: http://svn.apache.org/viewvc/ibatis/trunk/java/jpetstore/jpetstore5/build/build.xml?rev=679240&r1=679239&r2=679240&view=diff
==============================================================================
--- ibatis/trunk/java/jpetstore/jpetstore5/build/build.xml (original)
+++ ibatis/trunk/java/jpetstore/jpetstore5/build/build.xml Wed Jul 23 17:07:52 2008
@@ -88,7 +88,7 @@
   </target>
 
   <target name="test" depends="coverage.instrument">
-    <junit printsummary="yes" haltonfailure="no">
+    <junit printsummary="yes" haltonfailure="no" failureproperty="tests_failed">
       <classpath refid="classpath"/>
 
       <formatter type="xml"/>
@@ -160,6 +160,8 @@
     </jar>
   </target>
 
-  <target name="all" depends="test.report, coverage.report, war"/>
+  <target name="all" depends="test.report, coverage.report, war">
+    <fail if="tests_failed" message="The tests did not pass"/>    
+  </target>
 
 </project>

Added: ibatis/trunk/java/jpetstore/jpetstore5/test/com/ibatis/jpetstore/persistence/DaoManagerTest.java
URL: http://svn.apache.org/viewvc/ibatis/trunk/java/jpetstore/jpetstore5/test/com/ibatis/jpetstore/persistence/DaoManagerTest.java?rev=679240&view=auto
==============================================================================
--- ibatis/trunk/java/jpetstore/jpetstore5/test/com/ibatis/jpetstore/persistence/DaoManagerTest.java
(added)
+++ ibatis/trunk/java/jpetstore/jpetstore5/test/com/ibatis/jpetstore/persistence/DaoManagerTest.java
Wed Jul 23 17:07:52 2008
@@ -0,0 +1,16 @@
+package com.ibatis.jpetstore.persistence;
+
+import com.ibatis.jpetstore.persistence.iface.CategoryDao;
+import com.ibatis.dao.client.DaoManager;
+import junit.framework.TestCase;
+
+public class DaoManagerTest extends TestCase {
+  
+  public void testShouldGetDaoManagerInstance() {
+    DaoManager daoMgr = DaoConfig.getDaoManager();
+    assertNotNull(daoMgr);
+    CategoryDao catDao = (CategoryDao)daoMgr.getDao(CategoryDao.class);
+    assertNotNull(catDao);
+  }
+
+}



Mime
View raw message