Ejemplo n.º 1
0
 @Before
 public void setup() throws URISyntaxException {
   hiveDriver = new HiveDriver(delegate, null, true, jdbcUrlParser);
   testUrl = "testUrl";
   when(jdbcUrlParser.parse(testUrl)).thenReturn(jdbcUrl);
   when(jdbcUrl.toString()).thenReturn(testUrl);
 }
Ejemplo n.º 2
0
 @Test(expected = SQLException.class)
 public void testConnectFailParse() throws SQLException, URISyntaxException {
   String url = "fake-url";
   when(jdbcUrlParser.parse(url)).thenThrow(new URISyntaxException("", ""));
   hiveDriver.connect(url, null);
 }
Ejemplo n.º 3
0
 @Test
 public void testAcceptsUrlException() throws URISyntaxException, SQLException {
   String url = "fake-url";
   when(jdbcUrlParser.parse(url)).thenThrow(new URISyntaxException("", ""));
   assertFalse(hiveDriver.acceptsURL(url));
 }