Clean up usages of `@NotImplementedYet`
This commit is contained in:
parent
73e936b280
commit
326f2ae775
|
@ -14,7 +14,6 @@ import org.hibernate.collection.spi.PersistentCollection;
|
|||
|
||||
import org.hibernate.testing.jdbc.SQLStatementInspector;
|
||||
import org.hibernate.testing.orm.junit.DomainModel;
|
||||
import org.hibernate.testing.orm.junit.NotImplementedYet;
|
||||
import org.hibernate.testing.orm.junit.ServiceRegistry;
|
||||
import org.hibernate.testing.orm.junit.SessionFactory;
|
||||
import org.hibernate.testing.orm.junit.SessionFactoryScope;
|
||||
|
@ -29,7 +28,6 @@ import jakarta.persistence.criteria.JoinType;
|
|||
import jakarta.persistence.criteria.Root;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.setAllowComparingPrivateFields;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
|
|
@ -6,11 +6,9 @@
|
|||
*/
|
||||
package org.hibernate.orm.test.mapping.naturalid.inheritance.cache;
|
||||
|
||||
import org.hibernate.WrongClassException;
|
||||
import org.hibernate.cfg.AvailableSettings;
|
||||
|
||||
import org.hibernate.testing.orm.junit.DomainModel;
|
||||
import org.hibernate.testing.orm.junit.NotImplementedYet;
|
||||
import org.hibernate.testing.orm.junit.ServiceRegistry;
|
||||
import org.hibernate.testing.orm.junit.SessionFactory;
|
||||
import org.hibernate.testing.orm.junit.SessionFactoryScope;
|
||||
|
@ -22,7 +20,6 @@ import org.junit.jupiter.api.Test;
|
|||
import static org.hamcrest.Matchers.notNullValue;
|
||||
import static org.hamcrest.Matchers.nullValue;
|
||||
import static org.junit.Assert.assertThat;
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
@ServiceRegistry( settings = @Setting( name = AvailableSettings.USE_SECOND_LEVEL_CACHE, value = "false" ) )
|
||||
@DomainModel( annotatedClasses = { MyEntity.class, ExtendedEntity.class } )
|
||||
|
|
|
@ -7,20 +7,11 @@
|
|||
package org.hibernate.orm.test.query.hql.treat;
|
||||
|
||||
import java.util.List;
|
||||
import jakarta.persistence.DiscriminatorColumn;
|
||||
import jakarta.persistence.DiscriminatorValue;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.Inheritance;
|
||||
import jakarta.persistence.InheritanceType;
|
||||
import jakarta.persistence.Table;
|
||||
|
||||
import org.hibernate.cfg.AvailableSettings;
|
||||
import org.hibernate.query.sqm.StrictJpaComplianceViolation;
|
||||
|
||||
import org.hibernate.testing.orm.junit.DomainModel;
|
||||
import org.hibernate.testing.orm.junit.FailureExpected;
|
||||
import org.hibernate.testing.orm.junit.NotImplementedYet;
|
||||
import org.hibernate.testing.orm.junit.ServiceRegistry;
|
||||
import org.hibernate.testing.orm.junit.SessionFactory;
|
||||
import org.hibernate.testing.orm.junit.SessionFactoryScope;
|
||||
|
@ -29,6 +20,14 @@ import org.junit.jupiter.api.AfterEach;
|
|||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import jakarta.persistence.DiscriminatorColumn;
|
||||
import jakarta.persistence.DiscriminatorValue;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.Inheritance;
|
||||
import jakarta.persistence.InheritanceType;
|
||||
import jakarta.persistence.Table;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.junit.jupiter.api.Assertions.fail;
|
||||
|
||||
|
|
|
@ -7,19 +7,11 @@
|
|||
package org.hibernate.orm.test.query.hql.treat;
|
||||
|
||||
import java.util.List;
|
||||
import jakarta.persistence.DiscriminatorColumn;
|
||||
import jakarta.persistence.DiscriminatorValue;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.Inheritance;
|
||||
import jakarta.persistence.InheritanceType;
|
||||
import jakarta.persistence.Table;
|
||||
|
||||
import org.hibernate.cfg.AvailableSettings;
|
||||
import org.hibernate.query.sqm.StrictJpaComplianceViolation;
|
||||
|
||||
import org.hibernate.testing.orm.junit.DomainModel;
|
||||
import org.hibernate.testing.orm.junit.NotImplementedYet;
|
||||
import org.hibernate.testing.orm.junit.ServiceRegistry;
|
||||
import org.hibernate.testing.orm.junit.SessionFactory;
|
||||
import org.hibernate.testing.orm.junit.SessionFactoryScope;
|
||||
|
@ -28,6 +20,14 @@ import org.junit.jupiter.api.AfterEach;
|
|||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import jakarta.persistence.DiscriminatorColumn;
|
||||
import jakarta.persistence.DiscriminatorValue;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.Inheritance;
|
||||
import jakarta.persistence.InheritanceType;
|
||||
import jakarta.persistence.Table;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.junit.jupiter.api.Assertions.fail;
|
||||
|
||||
|
|
|
@ -14,19 +14,13 @@ import org.hibernate.query.spi.QueryImplementor;
|
|||
import org.hibernate.testing.orm.domain.StandardDomainModel;
|
||||
import org.hibernate.testing.orm.domain.retail.DomesticVendor;
|
||||
import org.hibernate.testing.orm.domain.retail.ForeignVendor;
|
||||
import org.hibernate.testing.orm.domain.retail.Vendor;
|
||||
import org.hibernate.testing.orm.junit.BaseSessionFactoryFunctionalTest;
|
||||
import org.hibernate.testing.orm.junit.FailureExpected;
|
||||
import org.hibernate.testing.orm.junit.NotImplementedYet;
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.hamcrest.Matcher;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
import static org.hamcrest.CoreMatchers.either;
|
||||
import static org.hamcrest.CoreMatchers.is;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
|
||||
/**
|
||||
* @author Steve Ebersole
|
||||
|
@ -59,23 +53,16 @@ public class DiscriminatorTests extends BaseSessionFactoryFunctionalTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
@NotImplementedYet(strict = false, reason = "selection of discriminator not yet implemented")
|
||||
public void testSelection() {
|
||||
inTransaction(
|
||||
session -> {
|
||||
final QueryImplementor query = session.createQuery( "select type( v ) from Vendor v" );
|
||||
final List list = query.list();
|
||||
assertThat( list.size(), is( 2 ) );
|
||||
for ( Object o : list ) {
|
||||
assertThat(
|
||||
o,
|
||||
(Matcher) either( is( DomesticVendor.class.getName() ) )
|
||||
.or( is( ForeignVendor.class.getName() ) )
|
||||
);
|
||||
}
|
||||
final QueryImplementor<Class> query = session.createQuery( "select type( v ) from Vendor v", Class.class );
|
||||
final List<Class> list = query.list();
|
||||
assertThat( list ).hasSize( 2 );
|
||||
assertThat( list ).containsOnly( DomesticVendor.class, ForeignVendor.class );
|
||||
|
||||
assert list.contains( DomesticVendor.class.getName() );
|
||||
assert list.contains( ForeignVendor.class.getName() );
|
||||
assertThat( list ).contains( DomesticVendor.class );
|
||||
assertThat( list ).contains( ForeignVendor.class );
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue