METAGEN-81 Formatting and moving test into its own method annotated with @TestForIssue
This commit is contained in:
parent
7bb932f505
commit
0ff88cff1f
|
@ -23,6 +23,7 @@ import java.util.List;
|
||||||
import org.testng.annotations.Test;
|
import org.testng.annotations.Test;
|
||||||
|
|
||||||
import org.hibernate.jpamodelgen.test.util.CompilationTest;
|
import org.hibernate.jpamodelgen.test.util.CompilationTest;
|
||||||
|
import org.hibernate.jpamodelgen.test.util.TestForIssue;
|
||||||
import org.hibernate.jpamodelgen.test.util.TestUtil;
|
import org.hibernate.jpamodelgen.test.util.TestUtil;
|
||||||
|
|
||||||
import static org.hibernate.jpamodelgen.test.util.TestUtil.assertAbsenceOfFieldInMetamodelFor;
|
import static org.hibernate.jpamodelgen.test.util.TestUtil.assertAbsenceOfFieldInMetamodelFor;
|
||||||
|
@ -67,12 +68,13 @@ public class AccessTypeTest extends CompilationTest {
|
||||||
assertAbsenceOfFieldInMetamodelFor(
|
assertAbsenceOfFieldInMetamodelFor(
|
||||||
Pet.class, "nonPersistent", "Collection of embeddable not taken care of"
|
Pet.class, "nonPersistent", "Collection of embeddable not taken care of"
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// see METAGEN-81
|
@Test
|
||||||
// access type should be inherited from the position of the @Id field annotation from the root entity
|
@TestForIssue( jiraKey = " METAGEN-81")
|
||||||
// via the @Embedded annotation
|
public void testAccessTypeForEmbeddableDeterminedByIdAnnotationInRootEntity() {
|
||||||
assertPresenceOfFieldInMetamodelFor( Hotel.class, "webmaster",
|
assertPresenceOfFieldInMetamodelFor( Hotel.class, "webmaster",
|
||||||
"Access type should be inherited from the hierarchy" );
|
"Access type should be inherited position of the @Id field annotation in the root entity" );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
* MA 02110-1301, USA.
|
* MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.hibernate.jpamodelgen.test.accesstype;
|
package org.hibernate.jpamodelgen.test.accesstype;
|
||||||
|
|
||||||
import javax.persistence.Embeddable;
|
import javax.persistence.Embeddable;
|
||||||
|
@ -38,5 +37,4 @@ public class Hotel {
|
||||||
public void setWebmaster(User webmaster) {
|
public void setWebmaster(User webmaster) {
|
||||||
this.webmaster = webmaster;
|
this.webmaster = webmaster;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -16,7 +16,6 @@
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
* MA 02110-1301, USA.
|
* MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.hibernate.jpamodelgen.test.accesstype;
|
package org.hibernate.jpamodelgen.test.accesstype;
|
||||||
|
|
||||||
import javax.persistence.Embedded;
|
import javax.persistence.Embedded;
|
||||||
|
@ -38,5 +37,4 @@ public class HotelRoom extends Room {
|
||||||
public void setHotel(Hotel hotel) {
|
public void setHotel(Hotel hotel) {
|
||||||
this.hotel = hotel;
|
this.hotel = hotel;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -16,7 +16,6 @@
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
* MA 02110-1301, USA.
|
* MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.hibernate.jpamodelgen.test.accesstype;
|
package org.hibernate.jpamodelgen.test.accesstype;
|
||||||
|
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
|
@ -27,7 +26,6 @@ import javax.persistence.Id;
|
||||||
*/
|
*/
|
||||||
@Entity
|
@Entity
|
||||||
public class Room {
|
public class Room {
|
||||||
|
|
||||||
@Id
|
@Id
|
||||||
private Integer id;
|
private Integer id;
|
||||||
|
|
||||||
|
@ -38,5 +36,4 @@ public class Room {
|
||||||
public void setId(Integer id) {
|
public void setId(Integer id) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue