This repository was archived by the owner on Jan 6, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
src/test/java/weblogic/logging/exporter/config Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 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+ }
You can’t perform that action at this time.
0 commit comments