@Test public void testGetThemeData() { final JSONObject themeDefinition = mock(JSONObject.class); final JSONObject colors = mock(JSONObject.class); final JSONString colorHEXCode = mock(JSONString.class); final JSONString base = mock(JSONString.class); final JSONBoolean inherit = mock(JSONBoolean.class); final JSONArray rules = mock(JSONArray.class); final JavaScriptObject expectedEditorThemeData = mock(JavaScriptObject.class); doReturn(colorHEXCode).when(factory).makeJSONString("#000000"); doReturn(base).when(factory).makeJSONString("vs"); doReturn(inherit).when(factory).makeJSONBoolean(false); doReturn(rules).when(factory).getRules(); when(themeDefinition.getJavaScriptObject()).thenReturn(expectedEditorThemeData); when(factory.makeJSONObject()).thenReturn(themeDefinition, colors); final JavaScriptObject actualEditorThemeData = factory.getThemeData(); verify(colors).put("editorLineNumber.foreground", colorHEXCode); verify(themeDefinition).put("base", base); verify(themeDefinition).put("inherit", inherit); verify(themeDefinition).put("rules", rules); verify(themeDefinition).put("colors", colors); assertEquals(expectedEditorThemeData, actualEditorThemeData); }
public JavaScriptObject getThemeData() { final JSONObject themeDefinition = makeJSONObject(); final JSONObject colors = makeJSONObject(); final JSONString colorHEXCode = makeJSONString("#000000"); final JSONString base = makeJSONString("vs"); final JSONBoolean inherit = makeJSONBoolean(false); final JSONArray rules = getRules(); colors.put("editorLineNumber.foreground", colorHEXCode); themeDefinition.put("base", base); themeDefinition.put("inherit", inherit); themeDefinition.put("rules", rules); themeDefinition.put("colors", colors); return themeDefinition.getJavaScriptObject(); }
MonacoPropertiesFactory { public JavaScriptObject getThemeData() { final JSONObject themeDefinition = makeJSONObject(); final JSONObject colors = makeJSONObject(); final JSONString colorHEXCode = makeJSONString("#000000"); final JSONString base = makeJSONString("vs"); final JSONBoolean inherit = makeJSONBoolean(false); final JSONArray rules = getRules(); colors.put("editorLineNumber.foreground", colorHEXCode); themeDefinition.put("base", base); themeDefinition.put("inherit", inherit); themeDefinition.put("rules", rules); themeDefinition.put("colors", colors); return themeDefinition.getJavaScriptObject(); } }
MonacoPropertiesFactory { public JavaScriptObject getThemeData() { final JSONObject themeDefinition = makeJSONObject(); final JSONObject colors = makeJSONObject(); final JSONString colorHEXCode = makeJSONString("#000000"); final JSONString base = makeJSONString("vs"); final JSONBoolean inherit = makeJSONBoolean(false); final JSONArray rules = getRules(); colors.put("editorLineNumber.foreground", colorHEXCode); themeDefinition.put("base", base); themeDefinition.put("inherit", inherit); themeDefinition.put("rules", rules); themeDefinition.put("colors", colors); return themeDefinition.getJavaScriptObject(); }  }
MonacoPropertiesFactory { public JavaScriptObject getThemeData() { final JSONObject themeDefinition = makeJSONObject(); final JSONObject colors = makeJSONObject(); final JSONString colorHEXCode = makeJSONString("#000000"); final JSONString base = makeJSONString("vs"); final JSONBoolean inherit = makeJSONBoolean(false); final JSONArray rules = getRules(); colors.put("editorLineNumber.foreground", colorHEXCode); themeDefinition.put("base", base); themeDefinition.put("inherit", inherit); themeDefinition.put("rules", rules); themeDefinition.put("colors", colors); return themeDefinition.getJavaScriptObject(); }  JavaScriptObject getConstructionOptions(); JavaScriptObject getThemeData(); JSONArray getRules(); JavaScriptObject getCompletionItemProvider(final MonacoFEELVariableSuggestions variableSuggestions); JavaScriptObject getLanguageDefinition(); JSONValue getTokenizer(); JSONArray getRoot(); JSONArray row(final String pattern,
                         final String name); JavaScriptObject getLanguage(); }
MonacoPropertiesFactory { public JavaScriptObject getThemeData() { final JSONObject themeDefinition = makeJSONObject(); final JSONObject colors = makeJSONObject(); final JSONString colorHEXCode = makeJSONString("#000000"); final JSONString base = makeJSONString("vs"); final JSONBoolean inherit = makeJSONBoolean(false); final JSONArray rules = getRules(); colors.put("editorLineNumber.foreground", colorHEXCode); themeDefinition.put("base", base); themeDefinition.put("inherit", inherit); themeDefinition.put("rules", rules); themeDefinition.put("colors", colors); return themeDefinition.getJavaScriptObject(); }  JavaScriptObject getConstructionOptions(); JavaScriptObject getThemeData(); JSONArray getRules(); JavaScriptObject getCompletionItemProvider(final MonacoFEELVariableSuggestions variableSuggestions); JavaScriptObject getLanguageDefinition(); JSONValue getTokenizer(); JSONArray getRoot(); JSONArray row(final String pattern,
                         final String name); JavaScriptObject getLanguage(); static final String FEEL_LANGUAGE_ID; static final String FEEL_THEME_ID; }