@Test(groups = "requires-bloomberg") public void testParse_InvalidSecurity() throws Exception { RequestBuilder<IntradayTickData> builder = new IntradayTickRequestBuilder( INVALID_SECURITY, new DateTime().minusDays(5), new DateTime()); IntradayTickData data = session.submit(builder).get(5, TimeUnit.MINUTES); assertTrue(data.hasErrors()); assertFalse(data.getSecurityErrors().isEmpty()); assertTrue(data.getFieldErrors().isEmpty()); assertTrue(data.isEmpty()); }
@Test(groups = "requires-bloomberg") public void testParse_OK() throws Exception { RequestBuilder<IntradayTickData> builder = new IntradayTickRequestBuilder("SPX Index", new DateTime().minusDays(5), new DateTime()) .includeBicMicCodes() .includeBrokerCodes() .includeConditionCodes() .includeExchangeCodes() .includeRpsCodes() .includeNonPlottableEvents(); IntradayTickData data = session.submit(builder).get(1, TimeUnit.MINUTES); assertFalse(data.hasErrors()); assertTrue(data.getSecurityErrors().isEmpty()); assertTrue(data.getFieldErrors().isEmpty()); assertFalse(data.isEmpty()); }