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 6
6
7
7
package weblogic .logging .exporter ;
8
8
9
+ import static org .hamcrest .CoreMatchers .containsString ;
10
+ import static org .hamcrest .MatcherAssert .assertThat ;
11
+ import static org .hamcrest .core .AllOf .allOf ;
9
12
import static org .junit .jupiter .api .Assertions .assertEquals ;
10
13
11
14
import org .junit .jupiter .api .DisplayName ;
@@ -29,11 +32,12 @@ public void afterCreated_canRetrieveFieldValues() {
29
32
assertEquals (true , result .isSuccessful ());
30
33
}
31
34
32
- @ DisplayName ("Check toString() works " )
35
+ @ DisplayName ("Check toString() includes response, status and successful " )
33
36
@ 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" )));
38
42
}
39
43
}
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ public void afterCreateMap_checkGoodTrueValues() {
58
58
59
59
@ DisplayName ("After creating a map, check that 'bad' true values are correctly interpreted" )
60
60
@ Test
61
- public void afterCreateMap_checkBaddTrueValues () {
61
+ public void afterCreateMap_checkBadTrueValues () {
62
62
Map <String , Object > map = createMapOfTrueValues ();
63
63
64
64
assertThrows (ConfigurationException .class , () -> MapUtils .getBooleanValue (map , "6" ));
You can’t perform that action at this time.
0 commit comments