-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds null input functionality for rfc5424, build defaults if nothing … (
#20) * Adds null input functionality for rfc5424, build defaults if nothing given, add some perf tests * Remove nulls, revert back to default of not subscribing to anything
- Loading branch information
1 parent
1a0138a
commit 416a26f
Showing
3 changed files
with
139 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
src/test/java/com/teragrep/rlo_06/EmptyParserInputTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.teragrep.rlo_06; | ||
|
||
import org.junit.jupiter.api.Assertions; | ||
import org.junit.jupiter.api.Test; | ||
|
||
import java.io.ByteArrayInputStream; | ||
import java.io.IOException; | ||
import java.io.InputStream; | ||
|
||
public class EmptyParserInputTest { | ||
@Test | ||
void testEmptyParserInput() throws IOException { | ||
// Should not break but also should not return any data | ||
RFC5424Parser parser = new RFC5424Parser(); | ||
Assertions.assertFalse(parser.next()); | ||
ResultSetAsString resultsetAsString = new ResultSetAsString(parser.get()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters