This repository was archived by the owner on Jan 6, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed
src/test/java/weblogic/logging/exporter Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change 66
77package weblogic .logging .exporter ;
88
9+ import static org .hamcrest .CoreMatchers .containsString ;
10+ import static org .hamcrest .MatcherAssert .assertThat ;
11+ import static org .hamcrest .core .AllOf .allOf ;
912import static org .junit .jupiter .api .Assertions .assertEquals ;
1013
1114import org .junit .jupiter .api .DisplayName ;
@@ -29,11 +32,12 @@ public void afterCreated_canRetrieveFieldValues() {
2932 assertEquals (true , result .isSuccessful ());
3033 }
3134
32- @ DisplayName ("Check toString() works " )
35+ @ DisplayName ("Check toString() includes response, status and successful " )
3336 @ Test
34- public void checkToString () {
35- Result result = new Result ("good" , 200 , true );
36-
37- assertEquals (EXPECTED_STRING , result .toString ());
37+ public void toStringIncludesResponseStatusAndSuccessful () {
38+ Result result = new Result ("good" , 1 , true );
39+ assertThat (
40+ result .toString (),
41+ allOf (containsString ("good" ), containsString ("1" ), containsString ("true" )));
3842 }
3943}
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ public void afterCreateMap_checkGoodTrueValues() {
5858
5959 @ DisplayName ("After creating a map, check that 'bad' true values are correctly interpreted" )
6060 @ Test
61- public void afterCreateMap_checkBaddTrueValues () {
61+ public void afterCreateMap_checkBadTrueValues () {
6262 Map <String , Object > map = createMapOfTrueValues ();
6363
6464 assertThrows (ConfigurationException .class , () -> MapUtils .getBooleanValue (map , "6" ));
You can’t perform that action at this time.
0 commit comments