/** * Verifies failures when incorrect request parameters are provided. * * @throws Exception if there were unexpected failures. */ @Test public void invalidRequests_null() throws Exception { // null request new ExpectedFailure<IllegalRequestParameterValue>( org.marketcetera.module.Messages.ILLEGAL_REQ_PARM_VALUE, TEST_URN.getValue(), null) { protected void run() throws Exception { esperPr.requestData(new DataRequest(TEST_URN, null), null); } }; }
// what if we just send it an empty array as a request? @Test public void invalidRequests_EmptyArray() throws Exception { final String[] emptyParams = new String[0]; new ExpectedTestFailure( IllegalRequestParameterValue.class, org.marketcetera.module.Messages.ILLEGAL_REQ_PARM_VALUE.getText( TEST_URN.getValue(), emptyParams)) { protected void execute() throws Throwable { esperPr.requestData(new DataRequest(TEST_URN, emptyParams), null); } }.run(); }