Пример #1
0
    @Test
    public void StringHandler() {
      final LogArgumentGroupExtractor extractor =
          LogArgumentGroupExtractor.instance("", "", "", "", LogFormatArgument.STRING.toString());

      httpLogFormatter.setLogic(extractor, formatter);

      assertTrue(formatter.getLogic() instanceof StringHandler);
    }
Пример #2
0
    @Test
    public void RequestGuidHandler() {
      final LogArgumentGroupExtractor extractor =
          LogArgumentGroupExtractor.instance(
              "", "", "", "", LogFormatArgument.TRACE_GUID.toString());

      httpLogFormatter.setLogic(extractor, formatter);

      assertTrue(formatter.getLogic() instanceof TraceGuidHandler);
    }
Пример #3
0
    @Test
    public void ResponseMessageHandler() {
      final LogArgumentGroupExtractor extractor =
          LogArgumentGroupExtractor.instance(
              "", "", "", "", LogFormatArgument.ERROR_MESSAGE.toString());

      httpLogFormatter.setLogic(extractor, formatter);

      assertTrue(formatter.getLogic() instanceof ResponseMessageHandler);
    }
Пример #4
0
    @Test
    public void TimeReceivedHandler() {
      final LogArgumentGroupExtractor extractor =
          LogArgumentGroupExtractor.instance(
              "", "", "", "", LogFormatArgument.TIME_RECEIVED.toString());

      httpLogFormatter.setLogic(extractor, formatter);

      assertTrue(formatter.getLogic() instanceof TimeReceivedHandler);
    }
Пример #5
0
    @Test
    public void UrlRequestedHandler() {
      final LogArgumentGroupExtractor extractor =
          LogArgumentGroupExtractor.instance(
              "", "", "", "", LogFormatArgument.URL_REQUESTED.toString());

      httpLogFormatter.setLogic(extractor, formatter);

      assertTrue(formatter.getLogic() instanceof UrlRequestedHandler);
    }
Пример #6
0
    @Test
    public void RequestMethodHandler() {
      final LogArgumentGroupExtractor extractor =
          LogArgumentGroupExtractor.instance(
              "", "", "", "", LogFormatArgument.REQUEST_METHOD.toString());

      httpLogFormatter.setLogic(extractor, formatter);

      assertTrue(formatter.getLogic() instanceof RequestMethodHandler);
    }
Пример #7
0
    @Test
    public void ResponseBytesHandler() {
      final LogArgumentGroupExtractor extractor =
          LogArgumentGroupExtractor.instance(
              "", "", "", "", LogFormatArgument.RESPONSE_BYTES.toString());

      httpLogFormatter.setLogic(extractor, formatter);

      assertTrue(formatter.getLogic() instanceof ResponseBytesHandler);
    }
Пример #8
0
    @Test
    public void RemoteUserHandler() {
      final LogArgumentGroupExtractor extractor =
          LogArgumentGroupExtractor.instance(
              "", "", "", "", LogFormatArgument.REMOTE_USER.toString());

      httpLogFormatter.setLogic(extractor, formatter);

      assertTrue(formatter.getLogic() instanceof RemoteUserHandler);
    }
Пример #9
0
    @Test
    public void LocalAddressHandler() {
      final LogArgumentGroupExtractor extractor =
          LogArgumentGroupExtractor.instance(
              "", "", "", "", LogFormatArgument.LOCAL_ADDRESS.toString());

      httpLogFormatter.setLogic(extractor, formatter);

      assertTrue(formatter.getLogic() instanceof LocalAddressHandler);
    }
Пример #10
0
    @Test
    public void CanonicalPortHandler() {
      final LogArgumentGroupExtractor extractor =
          LogArgumentGroupExtractor.instance(
              "", "", "", "", LogFormatArgument.CANONICAL_PORT.toString());

      httpLogFormatter.setLogic(extractor, formatter);

      assertTrue(formatter.getLogic() instanceof CanonicalPortHandler);
    }
Пример #11
0
    @Test
    public void ResponseTimeHandlerSeconds() {
      final LogArgumentGroupExtractor extractor =
          LogArgumentGroupExtractor.instance(
              "", "", "", "", LogFormatArgument.RESPONSE_TIME_SECONDS.toString());

      httpLogFormatter.setLogic(extractor, formatter);

      assertTrue(formatter.getLogic() instanceof ResponseTimeHandler);
    }
Пример #12
0
 @Test
 public void shouldNotHaveSetLogicByDefault() {
   assertNull(formatter.getLogic());
 }