HHH-6287 Adding description to junit assertions

This commit is contained in:
Hardy Ferentschik 2011-06-15 12:01:56 +02:00
parent 0eb87b73b9
commit 5c012f63e5
2 changed files with 5 additions and 5 deletions

View File

@ -119,6 +119,7 @@ public class EntityBinder {
// bind all attributes - simple as well as associations
bindAttributes( entityBinding );
bindTableUniqueConstraints( entityBinding );
// last, but not least we initialize and register the new EntityBinding
entityBinding.initialize( entityBindingState );
meta.addEntity( entityBinding );
@ -142,7 +143,7 @@ public class EntityBinder {
* @param tableAnnotation JPA annotations which has a {@code uniqueConstraints} attribute.
* @param table Table which the UniqueKey bind to.
*/
private void bindUniqueConstraints(AnnotationInstance tableAnnotation,TableSpecification table) {
private void bindUniqueConstraints(AnnotationInstance tableAnnotation, TableSpecification table) {
AnnotationValue value = tableAnnotation.value( "uniqueConstraints" );
if ( value == null ) {
return;

View File

@ -47,7 +47,7 @@ import static junit.framework.Assert.assertTrue;
*/
public class UniqueConstraintBindingTests extends BaseAnnotationBindingTestCase {
@Test
public void testTableUniqueconstraints() {
public void testTableUniqueConstraints() {
buildMetadataSources( TableWithUniqueConstraint.class );
EntityBinding binding = getEntityBinding( TableWithUniqueConstraint.class );
TableSpecification table = binding.getBaseTable();
@ -62,11 +62,10 @@ public class UniqueConstraintBindingTests extends BaseAnnotationBindingTestCase
int j = 0;
for ( Column column : key.getColumns() ) {
j++;
}
assertEquals( 2, j );
assertEquals( "There should be two columns in the unique constraint", 2, j );
}
assertEquals( 1, i );
assertEquals( "There should only be one unique constraint", 1, i );
}