Skip to content

Commit 5c012f6

Browse files
committed
HHH-6287 Adding description to junit assertions
1 parent 0eb87b7 commit 5c012f6

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

hibernate-core/src/main/java/org/hibernate/metamodel/source/annotations/entity/EntityBinder.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ public void bind() {
119119
// bind all attributes - simple as well as associations
120120
bindAttributes( entityBinding );
121121
bindTableUniqueConstraints( entityBinding );
122+
122123
// last, but not least we initialize and register the new EntityBinding
123124
entityBinding.initialize( entityBindingState );
124125
meta.addEntity( entityBinding );
@@ -142,7 +143,7 @@ private void bindTableUniqueConstraints(EntityBinding entityBinding) {
142143
* @param tableAnnotation JPA annotations which has a {@code uniqueConstraints} attribute.
143144
* @param table Table which the UniqueKey bind to.
144145
*/
145-
private void bindUniqueConstraints(AnnotationInstance tableAnnotation,TableSpecification table) {
146+
private void bindUniqueConstraints(AnnotationInstance tableAnnotation, TableSpecification table) {
146147
AnnotationValue value = tableAnnotation.value( "uniqueConstraints" );
147148
if ( value == null ) {
148149
return;

hibernate-core/src/test/java/org/hibernate/metamodel/source/annotations/entity/UniqueConstraintBindingTests.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
*/
4848
public class UniqueConstraintBindingTests extends BaseAnnotationBindingTestCase {
4949
@Test
50-
public void testTableUniqueconstraints() {
50+
public void testTableUniqueConstraints() {
5151
buildMetadataSources( TableWithUniqueConstraint.class );
5252
EntityBinding binding = getEntityBinding( TableWithUniqueConstraint.class );
5353
TableSpecification table = binding.getBaseTable();
@@ -62,11 +62,10 @@ public void testTableUniqueconstraints() {
6262
int j = 0;
6363
for ( Column column : key.getColumns() ) {
6464
j++;
65-
6665
}
67-
assertEquals( 2, j );
66+
assertEquals( "There should be two columns in the unique constraint", 2, j );
6867
}
69-
assertEquals( 1, i );
68+
assertEquals( "There should only be one unique constraint", 1, i );
7069
}
7170

7271

0 commit comments

Comments
 (0)