From f02ba820e59d09dfa4dc9b8f0caa323265ecc5a1 Mon Sep 17 00:00:00 2001 From: Steve Ebersole Date: Fri, 11 Jun 2021 15:11:17 -0500 Subject: [PATCH] Migrating tests from o.h.event --- .../internal => orm/test/event}/MergeContextTest.java | 7 ++++--- .../PreInsertEventListenerVetoBidirectionalTest.java | 6 +++--- .../PreInsertEventListenerVetoUnidirectionalTest.java | 9 +++------ .../test}/event/SessionEventListenersManagerTest.java | 6 +++--- 4 files changed, 13 insertions(+), 15 deletions(-) rename hibernate-core/src/test/java/org/hibernate/{event/internal => orm/test/event}/MergeContextTest.java (98%) rename hibernate-core/src/test/java/org/hibernate/{ => orm/test}/event/PreInsertEventListenerVetoBidirectionalTest.java (95%) rename hibernate-core/src/test/java/org/hibernate/{ => orm/test}/event/PreInsertEventListenerVetoUnidirectionalTest.java (92%) rename hibernate-core/src/test/java/org/hibernate/{ => orm/test}/event/SessionEventListenersManagerTest.java (93%) diff --git a/hibernate-core/src/test/java/org/hibernate/event/internal/MergeContextTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/event/MergeContextTest.java similarity index 98% rename from hibernate-core/src/test/java/org/hibernate/event/internal/MergeContextTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/event/MergeContextTest.java index 56502fcb78..8cfc8585fe 100644 --- a/hibernate-core/src/test/java/org/hibernate/event/internal/MergeContextTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/event/MergeContextTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.event.internal; +package org.hibernate.orm.test.event; import java.util.Collection; import java.util.HashMap; @@ -18,6 +18,7 @@ import org.junit.After; import org.junit.Before; import org.junit.Test; +import org.hibernate.event.internal.MergeContext; import org.hibernate.event.spi.EntityCopyObserver; import org.hibernate.event.spi.EventSource; import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase; diff --git a/hibernate-core/src/test/java/org/hibernate/event/PreInsertEventListenerVetoBidirectionalTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/event/PreInsertEventListenerVetoBidirectionalTest.java similarity index 95% rename from hibernate-core/src/test/java/org/hibernate/event/PreInsertEventListenerVetoBidirectionalTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/event/PreInsertEventListenerVetoBidirectionalTest.java index c988e8d398..1f736da6ce 100644 --- a/hibernate-core/src/test/java/org/hibernate/event/PreInsertEventListenerVetoBidirectionalTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/event/PreInsertEventListenerVetoBidirectionalTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.event; +package org.hibernate.orm.test.event; import javax.persistence.CascadeType; import javax.persistence.Entity; diff --git a/hibernate-core/src/test/java/org/hibernate/event/PreInsertEventListenerVetoUnidirectionalTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/event/PreInsertEventListenerVetoUnidirectionalTest.java similarity index 92% rename from hibernate-core/src/test/java/org/hibernate/event/PreInsertEventListenerVetoUnidirectionalTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/event/PreInsertEventListenerVetoUnidirectionalTest.java index cd07370f3b..8acf2d0972 100644 --- a/hibernate-core/src/test/java/org/hibernate/event/PreInsertEventListenerVetoUnidirectionalTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/event/PreInsertEventListenerVetoUnidirectionalTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.event; +package org.hibernate.orm.test.event; import javax.persistence.CascadeType; import javax.persistence.Entity; @@ -13,7 +13,6 @@ import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.OneToOne; -import org.hibernate.TransientObjectException; import org.hibernate.action.internal.EntityActionVetoException; import org.hibernate.event.service.spi.EventListenerRegistry; import org.hibernate.event.spi.EventType; @@ -26,8 +25,6 @@ import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase; import org.junit.Test; import static org.hibernate.testing.transaction.TransactionUtil.doInHibernate; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; /** diff --git a/hibernate-core/src/test/java/org/hibernate/event/SessionEventListenersManagerTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/event/SessionEventListenersManagerTest.java similarity index 93% rename from hibernate-core/src/test/java/org/hibernate/event/SessionEventListenersManagerTest.java rename to hibernate-core/src/test/java/org/hibernate/orm/test/event/SessionEventListenersManagerTest.java index d4eae4acda..16f8478aad 100644 --- a/hibernate-core/src/test/java/org/hibernate/event/SessionEventListenersManagerTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/event/SessionEventListenersManagerTest.java @@ -1,10 +1,10 @@ /* * Hibernate, Relational Persistence for Idiomatic Java * - * License: GNU Lesser General Public License (LGPL), version 2.1 or later. - * See the lgpl.txt file in the root directory or . + * License: GNU Lesser General Public License (LGPL), version 2.1 or later + * See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html */ -package org.hibernate.event; +package org.hibernate.orm.test.event; import org.hibernate.BaseSessionEventListener; import org.hibernate.SessionEventListener;