From: Asbell, J. <Jon...@Mc...> - 2003-04-01 22:21:05
|
We are trying to supply a HashMap of name/value pairs representing column name and column value for a row: mockResult.addExpectedNamedValues(myHashMapFullOfRowData); I create mock row data in this fashion..... ================================= MockDataSource mockDataSource = new MockDataSource(); MockConnection mockConn = new MockConnection(); MockStatement mockStatement = new MockStatement(); MockSingleRowResultSet mockResult = new MockSingleRowResultSet(); expectedDataHashMap.put("ORDER DATE", new java.sql.Date(System.currentTimeMillis())); When I execute I retrieve the data in the following manner..... ================================= anotherHashMap.put("ORDER DATE", resultSet.getDate("ORDER_DATE").toString()); ......an Exception gets thrown on the line above........ CommonMockSingleRowResultSet.SqlRow keys did not receive an expected item Unexpected:ORDER_DATE; Am I forgetting to set something in a relevant Mock Sql Object? |