コード例 #1
0
 @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());
 }
コード例 #2
0
 @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());
 }