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