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

Commit 2cd9bde

Browse files
committed
add some more tests
1 parent 27c3cef commit 2cd9bde

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
3+
*
4+
* Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
5+
*/
6+
7+
package weblogic.logging.exporter.config;
8+
9+
import static org.junit.jupiter.api.Assertions.assertEquals;
10+
11+
import java.util.HashMap;
12+
import java.util.Map;
13+
import org.junit.jupiter.api.DisplayName;
14+
import org.junit.jupiter.api.Test;
15+
16+
@DisplayName("Test FilterConfig class")
17+
public class FilterConfigTest {
18+
19+
private static final String EXPECTED_STRING =
20+
"FilterConfig{expression='MSGID != 'BEA-000449'', servers=[]}";
21+
22+
@DisplayName("Check toString() works as expected")
23+
@Test
24+
public void checkToStringWorksAsExpected() {
25+
Map<String, Object> map = new HashMap<>();
26+
map.put("FilterExpression", "MSGID != 'BEA-000449'");
27+
FilterConfig filterConfig = FilterConfig.create(map);
28+
29+
assertEquals(EXPECTED_STRING, filterConfig.toString());
30+
}
31+
}

0 commit comments

Comments
 (0)