[hibernate-commits] Hibernate SVN: r11571 - in trunk/Hibernate3/jmx/src: test and 4 other directories.
hibernate-commits at lists.jboss.org
hibernate-commits at lists.jboss.org
Sat May 26 01:19:34 EDT 2007
Author: steve.ebersole at jboss.com
Date: 2007-05-26 01:19:34 -0400 (Sat, 26 May 2007)
New Revision: 11571
Added:
trunk/Hibernate3/jmx/src/test/
trunk/Hibernate3/jmx/src/test/java/
trunk/Hibernate3/jmx/src/test/java/org/
trunk/Hibernate3/jmx/src/test/java/org/hibernate/
trunk/Hibernate3/jmx/src/test/java/org/hibernate/jmx/
trunk/Hibernate3/jmx/src/test/java/org/hibernate/jmx/Entity.hbm.xml
trunk/Hibernate3/jmx/src/test/java/org/hibernate/jmx/Entity.java
trunk/Hibernate3/jmx/src/test/java/org/hibernate/jmx/TrivialTest.java
Log:
fixing test because of split
Added: trunk/Hibernate3/jmx/src/test/java/org/hibernate/jmx/Entity.hbm.xml
===================================================================
--- trunk/Hibernate3/jmx/src/test/java/org/hibernate/jmx/Entity.hbm.xml (rev 0)
+++ trunk/Hibernate3/jmx/src/test/java/org/hibernate/jmx/Entity.hbm.xml 2007-05-26 05:19:34 UTC (rev 11571)
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+
+<hibernate-mapping>
+
+ <class name="org.hibernate.jmx.Entity">
+ <id name="id" type="long" column="id_">
+ <generator class="assigned"/>
+ </id>
+ <property name="name"/>
+ </class>
+
+</hibernate-mapping>
Added: trunk/Hibernate3/jmx/src/test/java/org/hibernate/jmx/Entity.java
===================================================================
--- trunk/Hibernate3/jmx/src/test/java/org/hibernate/jmx/Entity.java (rev 0)
+++ trunk/Hibernate3/jmx/src/test/java/org/hibernate/jmx/Entity.java 2007-05-26 05:19:34 UTC (rev 11571)
@@ -0,0 +1,27 @@
+package org.hibernate.jmx;
+
+/**
+ * {@inheritDoc}
+ *
+ * @author Steve Ebersole
+ */
+public class Entity {
+ private Long id;
+ private String name;
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+}
Added: trunk/Hibernate3/jmx/src/test/java/org/hibernate/jmx/TrivialTest.java
===================================================================
--- trunk/Hibernate3/jmx/src/test/java/org/hibernate/jmx/TrivialTest.java (rev 0)
+++ trunk/Hibernate3/jmx/src/test/java/org/hibernate/jmx/TrivialTest.java 2007-05-26 05:19:34 UTC (rev 11571)
@@ -0,0 +1,30 @@
+package org.hibernate.jmx;
+
+/**
+ * Test copied over from o.h.t.legacy.FooBarTest
+ *
+ * @author Steve Ebersole
+ */
+public class TrivialTest {
+ public void testService() throws Exception {
+ HibernateService hs = new HibernateService();
+ hs.setJndiName( "SessionFactory" );
+ hs.setMapResources( "org/hibernate/jmx/Entity.hbm.xml" );
+ hs.setShowSqlEnabled( "true" );
+ hs.start();
+ hs.stop();
+ hs.setProperty( "foo", "bar" );
+ hs.start();
+ hs.stop();
+ try {
+ hs.setMapResources( "non-existent" );
+ hs.start();
+ }
+ catch( Throwable t ) {
+ // expected behavior
+ }
+ finally {
+ hs.stop();
+ }
+ }
+}
More information about the hibernate-commits
mailing list