List of usage examples for org.springframework.integration.jdbc StoredProcExecutor setReturningResultSetRowMappers
public void setReturningResultSetRowMappers(Map<String, RowMapper<?>> returningResultSetRowMappers)
From source file:org.springframework.integration.jdbc.StoredProcExecutorTests.java
@Test public void testSetReturningResultSetRowMappersWithNullMap() { DataSource datasource = mock(DataSource.class); StoredProcExecutor storedProcExecutor = new StoredProcExecutor(datasource); try {//from w w w. ja va2 s . c o m storedProcExecutor.setReturningResultSetRowMappers(null); } catch (IllegalArgumentException e) { assertEquals("returningResultSetRowMappers must not be null.", e.getMessage()); return; } fail("Exception expected."); }
From source file:org.springframework.integration.jdbc.StoredProcExecutorTests.java
@Test public void testSetReturningResultSetRowMappersWithMapContainingNullValues() { DataSource datasource = mock(DataSource.class); StoredProcExecutor storedProcExecutor = new StoredProcExecutor(datasource); Map<String, RowMapper<?>> rowmappers = new HashMap<String, RowMapper<?>>(); rowmappers.put("results", null); try {//from w ww .ja v a2 s . c o m storedProcExecutor.setReturningResultSetRowMappers(rowmappers); } catch (IllegalArgumentException e) { assertEquals("The provided map cannot contain null values.", e.getMessage()); return; } fail("Exception expected."); }
From source file:org.springframework.integration.jdbc.StoredProcExecutorTests.java
@Test public void testSetReturningResultSetRowMappersWithEmptyMap() { DataSource datasource = mock(DataSource.class); StoredProcExecutor storedProcExecutor = new StoredProcExecutor(datasource); Map<String, RowMapper<?>> rowmappers = new HashMap<String, RowMapper<?>>(); storedProcExecutor.setReturningResultSetRowMappers(rowmappers); //Should Successfully finish }