Package org.apache.hadoop.hbase.stargate.client

Examples of org.apache.hadoop.hbase.stargate.client.Response


    }
    assertTrue(found);
  }

  public void testTableListText() throws IOException {
    Response response = client.get("/", MIMETYPE_PLAIN);
    assertEquals(response.getCode(), 200);
  }
View Full Code Here


    Response response = client.get("/", MIMETYPE_PLAIN);
    assertEquals(response.getCode(), 200);
  }

  public void testTableListXML() throws IOException, JAXBException {
    Response response = client.get("/", MIMETYPE_XML);
    assertEquals(response.getCode(), 200);
    TableListModel model = (TableListModel)
      context.createUnmarshaller()
        .unmarshal(new ByteArrayInputStream(response.getBody()));
    checkTableList(model);
  }
View Full Code Here

        .unmarshal(new ByteArrayInputStream(response.getBody()));
    checkTableList(model);
  }

  public void testTableListJSON() throws IOException {
    Response response = client.get("/", MIMETYPE_JSON);
    assertEquals(response.getCode(), 200);
  }
View Full Code Here

    Response response = client.get("/", MIMETYPE_JSON);
    assertEquals(response.getCode(), 200);
  }

  public void testTableListPB() throws IOException, JAXBException {
    Response response = client.get("/", MIMETYPE_PROTOBUF);
    assertEquals(response.getCode(), 200);
    TableListModel model = new TableListModel();
    model.getObjectFromMessage(response.getBody());
    checkTableList(model);
  }
View Full Code Here

      assertTrue(found);
    }
  }

  public void testTableInfoText() throws IOException {
    Response response = client.get("/" + TABLE + "/regions", MIMETYPE_PLAIN);
    assertEquals(response.getCode(), 200);
  }
View Full Code Here

    Response response = client.get("/" + TABLE + "/regions", MIMETYPE_PLAIN);
    assertEquals(response.getCode(), 200);
  }

  public void testTableInfoXML() throws IOException, JAXBException {
    Response response = client.get("/" + TABLE + "/regions", MIMETYPE_XML);
    assertEquals(response.getCode(), 200);
    TableInfoModel model = (TableInfoModel)
      context.createUnmarshaller()
        .unmarshal(new ByteArrayInputStream(response.getBody()));
    checkTableInfo(model);
  }
View Full Code Here

        .unmarshal(new ByteArrayInputStream(response.getBody()));
    checkTableInfo(model);
  }

  public void testTableInfoJSON() throws IOException {
    Response response = client.get("/" + TABLE + "/regions", MIMETYPE_JSON);
    assertEquals(response.getCode(), 200);
  }
View Full Code Here

    Response response = client.get("/" + TABLE + "/regions", MIMETYPE_JSON);
    assertEquals(response.getCode(), 200);
  }

  public void testTableInfoPB() throws IOException, JAXBException {
    Response response =
      client.get("/" + TABLE + "/regions", MIMETYPE_PROTOBUF);
    assertEquals(response.getCode(), 200);
    TableInfoModel model = new TableInfoModel();
    model.getObjectFromMessage(response.getBody());
    checkTableInfo(model);
  }
View Full Code Here

    assertEquals(jerseyVersion, ServletContainer.class.getPackage()
      .getImplementationVersion());
  }

  public void testGetStargateVersionText() throws IOException {
    Response response = client.get(Constants.PATH_VERSION, MIMETYPE_PLAIN);
    assertTrue(response.getCode() == 200);
    String body = Bytes.toString(response.getBody());
    assertTrue(body.length() > 0);
    assertTrue(body.contains(RESTServlet.VERSION_STRING));
    assertTrue(body.contains(System.getProperty("java.vm.vendor")));
    assertTrue(body.contains(System.getProperty("java.version")));
    assertTrue(body.contains(System.getProperty("java.vm.version")));
View Full Code Here

    assertTrue(body.contains(ServletContainer.class.getPackage()
      .getImplementationVersion()));
  }

  public void testGetStargateVersionXML() throws IOException, JAXBException {
    Response response = client.get(Constants.PATH_VERSION, MIMETYPE_XML);
    assertTrue(response.getCode() == 200);
    VersionModel model = (VersionModel)
      context.createUnmarshaller().unmarshal(
        new ByteArrayInputStream(response.getBody()));
    validate(model);
    LOG.info("success retrieving Stargate version as XML");
  }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hbase.stargate.client.Response

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.