APISonar


com.facebook.buck.frontend.thrift.FrontendRequestType.LOG

> com > facebook > buck > frontend > thrift > FrontendRequestType > LOG
com APIs facebook APIs buck APIs frontend APIs thrift APIs FrontendRequestType APIs LOG APIs

Example 1
public void requestIsCorrectlyCreated() {
    ThriftService<FrontendRequest, FrontendResponse> thriftService = createDefaultListener();
    logger = new ThriftScribeLogger(thriftService, executorService);
    logger.log(CATEGORY, LINES);

    // Test request outside as otherwise an assertion could fail silently.
    assertEquals(request.getType(), FrontendRequestType.LOG);
    assertEquals(request.getLogRequest().getType(), LogRequestType.SCRIBE_DATA);
    assertEquals(request.getLogRequest().getScribeData().getCategory(), CATEGORY);
    assertThat(
        request.getLogRequest().getScribeData().getLines(),
        Matchers.allOf(
            hasItem(LINES.get(0)), hasItem(LINES.get(1)), IsIterableWithSize.iterableWithSize(2)));
  }