Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

log4j appender implemented as JUnit rule #90

Closed
dmzaytsev opened this issue Mar 29, 2015 · 2 comments
Closed

log4j appender implemented as JUnit rule #90

dmzaytsev opened this issue Mar 29, 2015 · 2 comments

Comments

@dmzaytsev
Copy link
Contributor

log4j appender implemented as JUnit rule

I use mocked log4j appender in the unit test and check log output like this

Mockito.verify(appender)
   .doAppend(
       Matchers.argThat(
          new ArgumentMatcher<LoggingEvent>() {
              @Override
              public boolean matches(final Object argument) {
                  return ((LoggingEvent) argument)
                          .getRenderedMessage()
                          .matches("^.*accept.*$");

I got comment from my reviewer that "matching looks a bit glibly".

He suggest to create custom log4j appender as JUnit rule see more

@yegor256
Copy link
Owner

@dmzaytsev again, the description of the ticket sounds like a task, but it should be a bug. You should say what is broken and it's up to "us" how to solve it. You should say that you miss something in the project, or something doesn't work as you expect, etc.

@dmzaytsev
Copy link
Contributor Author

This is no longer necessary

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants