Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 374
Update the logging properties to opt-out of the prefix events #844#845
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
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
8b68f75d3f2a2f6d8f3077822d6f2e2d0e59ca8473c9d5b7854a746317219b70e9bb76File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| package org.owasp.esapi.logging.appender; | ||
| import static org.junit.Assert.assertEquals; | ||
| import org.junit.Test; | ||
| import org.junit.runner.RunWith; | ||
| import org.junit.runners.Parameterized; | ||
| import org.owasp.esapi.Logger; | ||
| import java.util.ArrayList; | ||
| import java.util.Collection; | ||
| import java.util.List; | ||
| @RunWith(Parameterized.class) | ||
| public class EventTypeLogSupplierIgnoreEventTypeTest { | ||
| @Parameterized.Parameters (name="{0} -> {1}") | ||
| public static Collection<Object[]> assembleTests() { | ||
| List<Object[]> paramSets = new ArrayList<>(); | ||
| paramSets.add(new Object[] {Logger.EVENT_FAILURE,""}); | ||
| paramSets.add(new Object[] {Logger.EVENT_SUCCESS,""}); | ||
| paramSets.add(new Object[] {Logger.EVENT_UNSPECIFIED,""}); | ||
| paramSets.add(new Object[] {Logger.SECURITY_AUDIT,""}); | ||
| paramSets.add(new Object[] {Logger.SECURITY_FAILURE,""}); | ||
| paramSets.add(new Object[] {Logger.SECURITY_SUCCESS,""}); | ||
| paramSets.add(new Object[] {null, ""}); | ||
| return paramSets; | ||
| } | ||
| private final Logger.EventType eventType; | ||
| private final String expectedResult; | ||
| public EventTypeLogSupplierIgnoreEventTypeTest(Logger.EventType eventType, String result) { | ||
| this.eventType = eventType; | ||
| this.expectedResult = result; | ||
| } | ||
Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Suggestion: Add blank line here for improved readability. | ||
| @Test | ||
| public void testEventTypeLogIgnoreEventType() { | ||
| EventTypeLogSupplier supplier = new EventTypeLogSupplier(eventType); | ||
| supplier.setLogEventType(false); | ||
| assertEquals(expectedResult, supplier.get()); | ||
| } | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.