示例#1
0
 @Test
 public void testPlaceholderButNoArgument() {
   log.info("Result: {}");
   assertEquals("INFO - Result: {}", log.getLogString());
 }
示例#2
0
 @Test
 public void testArgumentWithoutPlaceholder() {
   log.info("Nothing", 123);
   assertEquals("INFO - Nothing", log.getLogString());
 }
示例#3
0
 @Test
 public void testNullArgument() {
   log.info("Result: {}", (Object) null);
   assertEquals("INFO - Result: null", log.getLogString());
 }
示例#4
0
 @Test
 public void testSimpleLongArgument() {
   log.info("Result: {}", 1234567890l);
   assertEquals("INFO - Result: 1234567890", log.getLogString());
 }
示例#5
0
 @Test
 public void testSimpleBooleanArgument() {
   log.info("Result: {}", true);
   assertEquals("INFO - Result: true", log.getLogString());
 }
示例#6
0
 @Test
 public void testSimpleStringArgument() {
   log.info("Hallo {}!", "Christian");
   assertEquals("INFO - Hallo Christian!", log.getLogString());
 }