Add (correct) test for removing double dashes in StructuredSyslogMessage
This commit is contained in:
parent
583e37b0c9
commit
8d48a0ae3e
@ -269,4 +269,14 @@ public class StructuredSyslogMessageTest extends TestCase
|
||||
assertTrue((message.getStructuredData().get("data1")).size() == 1);
|
||||
assertEquals("b", message.getStructuredData().get("data1").get("a"));
|
||||
}
|
||||
|
||||
public void testMessageWithoutIdOrStructuredData()
|
||||
{
|
||||
final String messageStr = "- - TEST";
|
||||
final StructuredSyslogMessage message = StructuredSyslogMessage.fromString(messageStr);
|
||||
|
||||
assertEquals("TEST", message.getMessage());
|
||||
assertNull(message.getMessageId());
|
||||
assertNull(message.getStructuredData());
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user