Skip to content

Commit

Permalink
OGM-1349 Skip type check for stored procedures tests without mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
Anastasiia_Gavrilash authored and DavideD committed Oct 28, 2018
1 parent d32692c commit 4d69b24
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
Expand Up @@ -83,7 +83,7 @@ public void testSingleResultDynamicCall() throws Exception {
storedProcedureQuery.setParameter( UNIQUE_VALUE_PROC_PARAM, 1 );

Number singleResult = (Number) storedProcedureQuery.getSingleResult();
assertThat( singleResult ).isEqualTo( 1 );
assertThat( singleResult.intValue() ).isEqualTo( 1 );
} );
}

Expand Down Expand Up @@ -167,8 +167,10 @@ public void testResultSetStaticCallRaw() throws Exception {
storedProcedureQuery.setParameter( RESULT_SET_PROC_TITLE_PARAM, "title'2" );

@SuppressWarnings("unchecked")
List<Object[]> listResult = storedProcedureQuery.getResultList();
assertThat( listResult ).containsExactly( new Object[] { 2, "title'2" } );
List listResult = storedProcedureQuery.getResultList();
assertThat( listResult ).hasSize( 2 );
assertThat( ( (Number) listResult.get( 0 ) ).intValue() ).isEqualTo( 2 );
assertThat( listResult.get( 1 ) ).isEqualTo( "title'2" );
} );
}

Expand Down Expand Up @@ -207,7 +209,7 @@ public void testExceptionWhenProcedureDoesNotExist() throws Exception {

@Test
@SkipByGridDialect(
value = { NEO4J_EMBEDDED },
value = { NEO4J_EMBEDDED, NEO4J_REMOTE },
comment = "Work fine for Neo4j, because function still accepts integer value as a parameter")
public void testExceptionWhenUsingNotRegisteredParameter() throws Exception {
inTransaction( entityManager -> {
Expand Down
Expand Up @@ -150,8 +150,10 @@ public void testResultSetStaticCallRaw() throws Exception {
storedProcedureQuery.setParameter( 3, "title'2" );

@SuppressWarnings("unchecked")
List<Object[]> listResult = storedProcedureQuery.getResultList();
assertThat( listResult ).containsExactly( new Object[] { 2, "title'2" } );
List listResult = storedProcedureQuery.getResultList();
assertThat( listResult ).hasSize( 2 );
assertThat( ( (Number) listResult.get( 0 ) ).intValue() ).isEqualTo( 2 );
assertThat( listResult.get( 1 ) ).isEqualTo( "title'2" );
} );
}

Expand Down

0 comments on commit 4d69b24

Please sign in to comment.