@Test public void mixedCriteria() throws Exception { FindReachRequest req = new FindReachRequest(); req.modelID = TEST_MODEL_ID.toString(); req.edaName = " , ,, Albemarle Sound, Altamaha River, "; req.meanQLo = "50"; req.totContributingAreaLo = "100"; req.totContributingAreaHi = "150"; req.reachName = "cr"; req.huc = "030102"; FindReaches action = new FindReaches(); action.setReachRequest(req); action.setPageSize(10); DataTable result = action.run(); assertTrue(result.getRowCount() == 4); assertEquals(0, action.getValidationErrors().length); assertEquals("4915", result.getString(0, result.getColumnByName("FULL_IDENTIFIER"))); assertEquals("4851", result.getString(1, result.getColumnByName("FULL_IDENTIFIER"))); assertEquals("4840", result.getString(2, result.getColumnByName("FULL_IDENTIFIER"))); assertEquals("4850", result.getString(3, result.getColumnByName("FULL_IDENTIFIER"))); }
@Test public void eadName() throws Exception { FindReachRequest req = new FindReachRequest(); req.modelID = TEST_MODEL_ID.toString(); req.edaName = "Albemarle Sound, Winyah Bay"; FindReaches action = new FindReaches(); action.setReachRequest(req); action.setPageSize(10); DataTable result = action.run(); assertTrue(result.getRowCount() == 10); assertEquals(0, action.getValidationErrors().length); assertEquals("4563", result.getString(0, result.getColumnByName("FULL_IDENTIFIER"))); assertEquals("5469", result.getString(9, result.getColumnByName("FULL_IDENTIFIER"))); }