From 3797e2150ad3eb7b6ce6108f7550a3becf2e4133 Mon Sep 17 00:00:00 2001 From: Brett Meyer Date: Thu, 14 Feb 2013 18:12:08 -0500 Subject: [PATCH] HHH-6841 Applied @SkipForDialects to a couple of tests --- .../ManyToOneWithFormulaTest.java | 15 +++++++++------ .../hibernate/test/cut/CompositeUserTypeTest.java | 12 +++++++----- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/hibernate-core/src/test/java/org/hibernate/test/annotations/manytoonewithformula/ManyToOneWithFormulaTest.java b/hibernate-core/src/test/java/org/hibernate/test/annotations/manytoonewithformula/ManyToOneWithFormulaTest.java index c7fe1e1692..d18378fe55 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/annotations/manytoonewithformula/ManyToOneWithFormulaTest.java +++ b/hibernate-core/src/test/java/org/hibernate/test/annotations/manytoonewithformula/ManyToOneWithFormulaTest.java @@ -26,7 +26,8 @@ */ package org.hibernate.test.annotations.manytoonewithformula; -import org.junit.Test; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; import org.hibernate.Session; import org.hibernate.Transaction; @@ -36,10 +37,9 @@ import org.hibernate.dialect.Oracle8iDialect; import org.hibernate.dialect.SQLServer2005Dialect; import org.hibernate.testing.RequiresDialect; import org.hibernate.testing.SkipForDialect; +import org.hibernate.testing.SkipForDialects; import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; +import org.junit.Test; /** * @author Sharath Reddy @@ -155,8 +155,11 @@ public class ManyToOneWithFormulaTest extends BaseCoreFunctionalTestCase { } @Test - @SkipForDialect(value = { HSQLDialect.class, SQLServer2005Dialect.class, Oracle8iDialect.class, DB2Dialect.class }, - comment = "The used join conditions does not work in HSQLDB. See HHH-4497. And oracle/db2 do not support 'substring' function") + @SkipForDialects( { + @SkipForDialect( value = { HSQLDialect.class }, comment = "The used join conditions does not work in HSQLDB. See HHH-4497." ), + @SkipForDialect( value = { SQLServer2005Dialect.class } ), + @SkipForDialect( value = { Oracle8iDialect.class }, comment = "Oracle/DB2 do not support 'substring' function" ), + @SkipForDialect( value = { DB2Dialect.class }, comment = "Oracle/DB2 do not support 'substring' function" ) } ) public void testManyToOneFromNonPkToNonPk() throws Exception { // also tests usage of the stand-alone @JoinFormula annotation (i.e. not wrapped within @JoinColumnsOrFormulas) Session s = openSession(); diff --git a/hibernate-core/src/test/java/org/hibernate/test/cut/CompositeUserTypeTest.java b/hibernate-core/src/test/java/org/hibernate/test/cut/CompositeUserTypeTest.java index 4a7e59d357..a7b4021c27 100755 --- a/hibernate-core/src/test/java/org/hibernate/test/cut/CompositeUserTypeTest.java +++ b/hibernate-core/src/test/java/org/hibernate/test/cut/CompositeUserTypeTest.java @@ -22,21 +22,21 @@ * Boston, MA 02110-1301 USA */ package org.hibernate.test.cut; +import static org.junit.Assert.assertEquals; + import java.math.BigDecimal; import java.util.Currency; import java.util.List; -import org.junit.Test; - import org.hibernate.Session; import org.hibernate.criterion.Restrictions; import org.hibernate.dialect.DB2Dialect; import org.hibernate.dialect.HSQLDialect; import org.hibernate.dialect.SybaseASE15Dialect; import org.hibernate.testing.SkipForDialect; +import org.hibernate.testing.SkipForDialects; import org.hibernate.testing.junit4.BaseCoreFunctionalTestCase; - -import static org.junit.Assert.assertEquals; +import org.junit.Test; /** * @author Gavin King @@ -78,7 +78,9 @@ public class CompositeUserTypeTest extends BaseCoreFunctionalTestCase { } @Test - @SkipForDialect( value = {SybaseASE15Dialect.class, DB2Dialect.class}, jiraKey = "HHH-6788,HHH-6867") + @SkipForDialects( { + @SkipForDialect ( value = { SybaseASE15Dialect.class }, jiraKey = "HHH-6788" ), + @SkipForDialect ( value = { DB2Dialect.class }, jiraKey = "HHH-6867" ) } ) public void testCustomColumnReadAndWrite() { Session s = openSession(); org.hibernate.Transaction t = s.beginTransaction();