Exemplo n.º 1
0
    @Test
    public void StringHandler() {
      final LogArgumentGroupExtractor extractor =
          LogArgumentGroupExtractor.instance("", "", "", "", LogFormatArgument.STRING.toString());

      httpLogFormatter.setLogic(extractor, formatter);

      assertTrue(formatter.getLogic() instanceof StringHandler);
    }
Exemplo n.º 2
0
    @Test
    public void RequestGuidHandler() {
      final LogArgumentGroupExtractor extractor =
          LogArgumentGroupExtractor.instance(
              "", "", "", "", LogFormatArgument.TRACE_GUID.toString());

      httpLogFormatter.setLogic(extractor, formatter);

      assertTrue(formatter.getLogic() instanceof TraceGuidHandler);
    }
Exemplo n.º 3
0
    @Test
    public void ResponseMessageHandler() {
      final LogArgumentGroupExtractor extractor =
          LogArgumentGroupExtractor.instance(
              "", "", "", "", LogFormatArgument.ERROR_MESSAGE.toString());

      httpLogFormatter.setLogic(extractor, formatter);

      assertTrue(formatter.getLogic() instanceof ResponseMessageHandler);
    }
Exemplo n.º 4
0
    @Test
    public void TimeReceivedHandler() {
      final LogArgumentGroupExtractor extractor =
          LogArgumentGroupExtractor.instance(
              "", "", "", "", LogFormatArgument.TIME_RECEIVED.toString());

      httpLogFormatter.setLogic(extractor, formatter);

      assertTrue(formatter.getLogic() instanceof TimeReceivedHandler);
    }
Exemplo n.º 5
0
    @Test
    public void UrlRequestedHandler() {
      final LogArgumentGroupExtractor extractor =
          LogArgumentGroupExtractor.instance(
              "", "", "", "", LogFormatArgument.URL_REQUESTED.toString());

      httpLogFormatter.setLogic(extractor, formatter);

      assertTrue(formatter.getLogic() instanceof UrlRequestedHandler);
    }
Exemplo n.º 6
0
    @Test
    public void RequestMethodHandler() {
      final LogArgumentGroupExtractor extractor =
          LogArgumentGroupExtractor.instance(
              "", "", "", "", LogFormatArgument.REQUEST_METHOD.toString());

      httpLogFormatter.setLogic(extractor, formatter);

      assertTrue(formatter.getLogic() instanceof RequestMethodHandler);
    }
Exemplo n.º 7
0
    @Test
    public void ResponseBytesHandler() {
      final LogArgumentGroupExtractor extractor =
          LogArgumentGroupExtractor.instance(
              "", "", "", "", LogFormatArgument.RESPONSE_BYTES.toString());

      httpLogFormatter.setLogic(extractor, formatter);

      assertTrue(formatter.getLogic() instanceof ResponseBytesHandler);
    }
Exemplo n.º 8
0
    @Test
    public void RemoteUserHandler() {
      final LogArgumentGroupExtractor extractor =
          LogArgumentGroupExtractor.instance(
              "", "", "", "", LogFormatArgument.REMOTE_USER.toString());

      httpLogFormatter.setLogic(extractor, formatter);

      assertTrue(formatter.getLogic() instanceof RemoteUserHandler);
    }
Exemplo n.º 9
0
    @Test
    public void LocalAddressHandler() {
      final LogArgumentGroupExtractor extractor =
          LogArgumentGroupExtractor.instance(
              "", "", "", "", LogFormatArgument.LOCAL_ADDRESS.toString());

      httpLogFormatter.setLogic(extractor, formatter);

      assertTrue(formatter.getLogic() instanceof LocalAddressHandler);
    }
Exemplo n.º 10
0
    @Test
    public void CanonicalPortHandler() {
      final LogArgumentGroupExtractor extractor =
          LogArgumentGroupExtractor.instance(
              "", "", "", "", LogFormatArgument.CANONICAL_PORT.toString());

      httpLogFormatter.setLogic(extractor, formatter);

      assertTrue(formatter.getLogic() instanceof CanonicalPortHandler);
    }
Exemplo n.º 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);
    }
Exemplo n.º 12
0
 @Test
 public void shouldNotHaveSetLogicByDefault() {
   assertNull(formatter.getLogic());
 }