void () { String fontName1 = FontPreferencesTest.getExistingNonDefaultFontName(); String fontName2 = FontPreferencesTest.getAnotherExistingNonDefaultFontName(); myScheme.setEditorFontName(fontName1); FontPreferences fontPreferences = myScheme.getFontPreferences(); assertInstanceOf(fontPreferences, ModifiableFontPreferences.class); ((ModifiableFontPreferences)fontPreferences).register(fontName1, 25); ((ModifiableFontPreferences)fontPreferences).register(fontName2, 13); FontPreferences consoleFontPreferences = myScheme.getConsoleFontPreferences(); assertInstanceOf(consoleFontPreferences, FontPreferences.class); myScheme.setConsoleFontSize(10); consoleFontPreferences = myScheme.getConsoleFontPreferences(); assertInstanceOf(consoleFontPreferences, ModifiableFontPreferences.class); ((ModifiableFontPreferences)consoleFontPreferences).register(fontName1, 21); ((ModifiableFontPreferences)consoleFontPreferences).register(fontName2, 15); FontPreferencesTest.checkState(myScheme.getFontPreferences(), Arrays.asList(fontName1, fontName2), Arrays.asList(fontName1, fontName2), fontName1, fontName1, 25, fontName2, 13); assertEquals(fontName1, myScheme.getEditorFontName()); assertEquals(25, myScheme.getEditorFontSize()); FontPreferencesTest.checkState(myScheme.getConsoleFontPreferences(), Arrays.asList(fontName1, fontName2), Arrays.asList(fontName1, fontName2), fontName1, fontName1, 21, fontName2, 15); assertEquals(fontName1, myScheme.getConsoleFontName()); assertEquals(21, myScheme.getConsoleFontSize()); myScheme.setUseEditorFontPreferencesInConsole(); FontPreferencesTest.checkState(myScheme.getConsoleFontPreferences(), Arrays.asList(fontName1, fontName2), Arrays.asList(fontName1, fontName2), fontName1, fontName1, 25, fontName2, 13); }