Skip to content
This repository was archived by the owner on Apr 28, 2023. It is now read-only.

Commit 48d7374

Browse files
committed
Fixing test case as change in method because Class extended
1 parent 55275aa commit 48d7374

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

common/src/main/java/net/adoptopenjdk/icedteaweb/logging/BaseLogger.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*/
99
public abstract class BaseLogger implements Logger {
1010

11-
protected String expand(final String msg, final Object[] args) {
11+
protected static String expand(final String msg, final Object[] args) {
1212
return new StringFormatter().expand(msg, args);
1313
}
1414
}

common/src/test/java/net/adoptopenjdk/icedteaweb/logging/BaseLoggerTest.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,54 +11,54 @@ public void testNullMessageHandledCorrectly() {
1111
final String message = null;
1212
final Object[] args = {"ONE"};
1313

14-
assertThat(BaseLogger.doExpand(message, args), is("null"));
14+
assertThat(BaseLogger.expand(message, args), is("null"));
1515
}
1616

1717
@Test
1818
public void testMessageWithoutArgumentsStaysUnchanged() {
1919
final String message = "Message without arguments stay unchanged.";
2020
final Object[] args = {};
2121

22-
assertThat(BaseLogger.doExpand(message, args), is("Message without arguments stay unchanged."));
22+
assertThat(BaseLogger.expand(message, args), is("Message without arguments stay unchanged."));
2323
}
2424

2525
@Test
2626
public void testMessageWitNullArgumentsStaysUnchanged() {
2727
final String message = "Message with null arguments stay unchanged.";
2828
final Object[] args = null;
2929

30-
assertThat(BaseLogger.doExpand(message, args), is("Message with null arguments stay unchanged."));
30+
assertThat(BaseLogger.expand(message, args), is("Message with null arguments stay unchanged."));
3131
}
3232

3333
@Test
3434
public void testMessageWithOneArgumentExpandsCorrectly() {
3535
final String message = "This is a message with {} argument.";
3636
final Object[] args = {"ONE"};
3737

38-
assertThat(BaseLogger.doExpand(message, args), is("This is a message with ONE argument."));
38+
assertThat(BaseLogger.expand(message, args), is("This is a message with ONE argument."));
3939
}
4040

4141
@Test
4242
public void testMessageWithTwoArgumentExpandsCorrectly() {
4343
final String message = "This is a message with the arguments {} and {}.";
4444
final Object[] args = {"ONE", 2};
4545

46-
assertThat(BaseLogger.doExpand(message, args), is("This is a message with the arguments ONE and 2."));
46+
assertThat(BaseLogger.expand(message, args), is("This is a message with the arguments ONE and 2."));
4747
}
4848

4949
@Test
5050
public void testMessageWithTooManyArgumentExpandsCorrectly() {
5151
final String message = "This is a message with the arguments {} and {}.";
5252
final Object[] args = {"ONE", 2, "abc"};
5353

54-
assertThat(BaseLogger.doExpand(message, args), is("This is a message with the arguments ONE and 2."));
54+
assertThat(BaseLogger.expand(message, args), is("This is a message with the arguments ONE and 2."));
5555
}
5656

5757
@Test
5858
public void testMessageWithTooFewArgumentsExpandsCorrectly() {
5959
final String message = "This is a message with the arguments {} and {}.";
6060
final Object[] args = {"ONE"};
6161

62-
assertThat(BaseLogger.doExpand(message, args), is("This is a message with the arguments ONE and {}."));
62+
assertThat(BaseLogger.expand(message, args), is("This is a message with the arguments ONE and {}."));
6363
}
6464
}

0 commit comments

Comments
 (0)