@@ -41,7 +41,7 @@ void testGivesHigherPriorityToDeeperMatches() throws Exception {
4141 ]}""" );
4242
4343 final var actual = theme .match (ScopeStack .from ("punctuation.definition.string.begin.html" ));
44- assertEquals (theme .getColorMap ().get (actual .foregroundId ), "#300000" );
44+ assertThat (theme .getColorMap ().get (actual .foregroundId )). isEqualTo ( "#300000" );
4545 }
4646
4747 @ Test
@@ -58,7 +58,7 @@ void testGivesHigherPriorityToParentMatches1() throws Exception {
5858
5959 final var map = theme .getColorMap ();
6060
61- assertEquals (map .get (theme .match (ScopeStack .from ("d" , "a.b" )).foregroundId ), "#400000" );
61+ assertThat (map .get (theme .match (ScopeStack .from ("d" , "a.b" )).foregroundId )). isEqualTo ( "#400000" );
6262 }
6363
6464 @ Test
@@ -80,7 +80,7 @@ void testGivesHigherPriorityToParentMatches2() throws Exception {
8080 "entity.name.tag.structure.any.html" ));
8181
8282 final var colorMap = theme .getColorMap ();
83- assertEquals (colorMap .get (result .foregroundId ), "#300000" );
83+ assertThat (colorMap .get (result .foregroundId )). isEqualTo ( "#300000" );
8484 }
8585
8686 private Map <String , String > match (final Theme theme , final String ... path ) {
@@ -118,41 +118,41 @@ void testCanMatch() throws Exception {
118118 ]}""" );
119119
120120 // simpleMatch1..25
121- assertEquals (match (theme , "source" ), map ("background" , "#100000" , "fontStyle" , "not set" ));
122- assertEquals (match (theme , "source" ), map ("background" , "#100000" , "fontStyle" , "not set" ));
123- assertEquals (match (theme , "source.ts" ), map ("background" , "#100000" , "fontStyle" , "not set" ));
124- assertEquals (match (theme , "source.tss" ), map ("background" , "#100000" , "fontStyle" , "not set" ));
125- assertEquals (match (theme , "something" ), map ("background" , "#100000" , "fontStyle" , "not set" ));
126- assertEquals (match (theme , "something.ts" ), map ("background" , "#100000" , "fontStyle" , "not set" ));
127- assertEquals (match (theme , "something.tss" ), map ("background" , "#100000" , "fontStyle" , "not set" ));
128- assertEquals (match (theme , "baz" ), map ("background" , "#200000" , "fontStyle" , "not set" ));
129- assertEquals (match (theme , "baz.ts" ), map ("background" , "#200000" , "fontStyle" , "not set" ));
130- assertEquals (match (theme , "baz.tss" ), map ("background" , "#200000" , "fontStyle" , "not set" ));
131- assertEquals (match (theme , "constant" ), map ("foreground" , "#300000" , "fontStyle" , "italic" ));
132- assertEquals (match (theme , "constant.string" ), map ("foreground" , "#300000" , "fontStyle" , "italic" ));
133- assertEquals (match (theme , "constant.hex" ), map ("foreground" , "#300000" , "fontStyle" , "italic" ));
134- assertEquals (match (theme , "constant.numeric" ), map ("foreground" , "#400000" , "fontStyle" , "italic" ));
135- assertEquals (match (theme , "constant.numeric.baz" ), map ("foreground" , "#400000" , "fontStyle" , "italic" ));
136- assertEquals (match (theme , "constant.numeric.hex" ), map ("foreground" , "#400000" , "fontStyle" , "bold" ));
137- assertEquals (match (theme , "constant.numeric.hex.baz" ), map ("foreground" , "#400000" , "fontStyle" , "bold" ));
138- assertEquals (match (theme , "constant.numeric.oct" ), map ("foreground" , "#400000" , "fontStyle" , "italic bold underline" ));
139- assertEquals (match (theme , "constant.numeric.oct.baz" ), map ("foreground" , "#400000" , "fontStyle" , "italic bold underline" ));
140- assertEquals (match (theme , "constant.numeric.dec" ), map ("foreground" , "#500000" , "fontStyle" , "none" ));
141- assertEquals (match (theme , "constant.numeric.dec.baz" ), map ("foreground" , "#500000" , "fontStyle" , "none" ));
142- assertEquals (match (theme , "storage.object.bar" ), map ("foreground" , "#600000" , "fontStyle" , "none" ));
143- assertEquals (match (theme , "storage.object.bar.baz" ), map ("foreground" , "#600000" , "fontStyle" , "none" ));
144- assertEquals (match (theme , "storage.object.bart" ), map ("fontStyle" , "not set" ));
145- assertEquals (match (theme , "storage.object" ), map ("fontStyle" , "not set" ));
146- assertEquals (match (theme , "storage" ), map ("fontStyle" , "not set" ));
121+ assertThat (match (theme , "source" )). isEqualTo ( map ("background" , "#100000" , "fontStyle" , "not set" ));
122+ assertThat (match (theme , "source" )). isEqualTo ( map ("background" , "#100000" , "fontStyle" , "not set" ));
123+ assertThat (match (theme , "source.ts" )). isEqualTo ( map ("background" , "#100000" , "fontStyle" , "not set" ));
124+ assertThat (match (theme , "source.tss" )). isEqualTo ( map ("background" , "#100000" , "fontStyle" , "not set" ));
125+ assertThat (match (theme , "something" )). isEqualTo ( map ("background" , "#100000" , "fontStyle" , "not set" ));
126+ assertThat (match (theme , "something.ts" )). isEqualTo ( map ("background" , "#100000" , "fontStyle" , "not set" ));
127+ assertThat (match (theme , "something.tss" )). isEqualTo ( map ("background" , "#100000" , "fontStyle" , "not set" ));
128+ assertThat (match (theme , "baz" )). isEqualTo ( map ("background" , "#200000" , "fontStyle" , "not set" ));
129+ assertThat (match (theme , "baz.ts" )). isEqualTo ( map ("background" , "#200000" , "fontStyle" , "not set" ));
130+ assertThat (match (theme , "baz.tss" )). isEqualTo ( map ("background" , "#200000" , "fontStyle" , "not set" ));
131+ assertThat (match (theme , "constant" )). isEqualTo ( map ("foreground" , "#300000" , "fontStyle" , "italic" ));
132+ assertThat (match (theme , "constant.string" )). isEqualTo ( map ("foreground" , "#300000" , "fontStyle" , "italic" ));
133+ assertThat (match (theme , "constant.hex" )). isEqualTo ( map ("foreground" , "#300000" , "fontStyle" , "italic" ));
134+ assertThat (match (theme , "constant.numeric" )). isEqualTo ( map ("foreground" , "#400000" , "fontStyle" , "italic" ));
135+ assertThat (match (theme , "constant.numeric.baz" )). isEqualTo ( map ("foreground" , "#400000" , "fontStyle" , "italic" ));
136+ assertThat (match (theme , "constant.numeric.hex" )). isEqualTo ( map ("foreground" , "#400000" , "fontStyle" , "bold" ));
137+ assertThat (match (theme , "constant.numeric.hex.baz" )). isEqualTo ( map ("foreground" , "#400000" , "fontStyle" , "bold" ));
138+ assertThat (match (theme , "constant.numeric.oct" )). isEqualTo ( map ("foreground" , "#400000" , "fontStyle" , "italic bold underline" ));
139+ assertThat (match (theme , "constant.numeric.oct.baz" )). isEqualTo ( map ("foreground" , "#400000" , "fontStyle" , "italic bold underline" ));
140+ assertThat (match (theme , "constant.numeric.dec" )). isEqualTo ( map ("foreground" , "#500000" , "fontStyle" , "none" ));
141+ assertThat (match (theme , "constant.numeric.dec.baz" )). isEqualTo ( map ("foreground" , "#500000" , "fontStyle" , "none" ));
142+ assertThat (match (theme , "storage.object.bar" )). isEqualTo ( map ("foreground" , "#600000" , "fontStyle" , "none" ));
143+ assertThat (match (theme , "storage.object.bar.baz" )). isEqualTo ( map ("foreground" , "#600000" , "fontStyle" , "none" ));
144+ assertThat (match (theme , "storage.object.bart" )). isEqualTo ( map ("fontStyle" , "not set" ));
145+ assertThat (match (theme , "storage.object" )). isEqualTo ( map ("fontStyle" , "not set" ));
146+ assertThat (match (theme , "storage" )). isEqualTo ( map ("fontStyle" , "not set" ));
147147
148148 // defaultMatch1..3
149- assertEquals (match (theme , "" ), map ("fontStyle" , "not set" ));
150- assertEquals (match (theme , "bazz" ), map ("fontStyle" , "not set" ));
151- assertEquals (match (theme , "asdfg" ), map ("fontStyle" , "not set" ));
149+ assertThat (match (theme , "" )). isEqualTo ( map ("fontStyle" , "not set" ));
150+ assertThat (match (theme , "bazz" )). isEqualTo ( map ("fontStyle" , "not set" ));
151+ assertThat (match (theme , "asdfg" )). isEqualTo ( map ("fontStyle" , "not set" ));
152152
153153 // multiMatch1..2
154- assertEquals (match (theme , "bar" ), map ("background" , "#200000" , "fontStyle" , "not set" ));
155- assertEquals (match (theme , "source.css" , "selector" , "bar" ), map ("background" , "#200000" , "fontStyle" , "bold" ));
154+ assertThat (match (theme , "bar" )). isEqualTo ( map ("background" , "#200000" , "fontStyle" , "not set" ));
155+ assertThat (match (theme , "source.css" , "selector" , "bar" )). isEqualTo ( map ("background" , "#200000" , "fontStyle" , "bold" ));
156156 }
157157
158158 @ Test
@@ -191,6 +191,6 @@ void testMicrosoft_vscode_23460() throws Exception {
191191 "meta.structure.dictionary.value.json" ,
192192 "string.quoted.double.json" );
193193 final var result = theme .match (path );
194- assertEquals (theme .getColorMap ().get (result .foregroundId ), "#FF410D" );
194+ assertThat (theme .getColorMap ().get (result .foregroundId )). isEqualTo ( "#FF410D" );
195195 }
196196}
0 commit comments