@Test public void testGetConstructionOptions() { final JSONObject options = mock(JSONObject.class); final JSONObject scrollbar = mock(JSONObject.class); final JSONObject miniMap = mock(JSONObject.class); final JSONString language = mock(JSONString.class); final JSONString theme = mock(JSONString.class); final JSONString renderLineHighlight = mock(JSONString.class); final JSONString lineNumbers = mock(JSONString.class); final JSONBoolean overviewRulerBorder = mock(JSONBoolean.class); final JSONBoolean scrollBeyondLastLine = mock(JSONBoolean.class); final JSONBoolean snippetSuggestions = mock(JSONBoolean.class); final JSONBoolean useTabStops = mock(JSONBoolean.class); final JSONBoolean contextmenu = mock(JSONBoolean.class); final JSONBoolean folding = mock(JSONBoolean.class); final JSONBoolean enabled = mock(JSONBoolean.class); final JSONBoolean useShadows = mock(JSONBoolean.class); final JSONValue fontSize = mock(JSONValue.class); final JSONValue lineNumbersMinChars = mock(JSONValue.class); final JSONValue lineDecorationsWidth = mock(JSONValue.class); final JSONBoolean automaticLayout = mock(JSONBoolean.class); final JSONBoolean renderWhitespace = mock(JSONBoolean.class); final JSONBoolean hideCursorInOverviewRuler = mock(JSONBoolean.class); final JavaScriptObject expectedOptions = mock(JavaScriptObject.class); doReturn(language).when(factory).makeJSONString(FEEL_LANGUAGE_ID); doReturn(theme).when(factory).makeJSONString(FEEL_THEME_ID); doReturn(renderLineHighlight).when(factory).makeJSONString("none"); doReturn(lineNumbers).when(factory).makeJSONString("off"); doReturn(fontSize).when(factory).makeJSONNumber(12); when(options.getJavaScriptObject()).thenReturn(expectedOptions); when(factory.makeJSONObject()).thenReturn(options, scrollbar, miniMap); when(factory.makeJSONNumber(1)).thenReturn(lineNumbersMinChars, lineDecorationsWidth); when(factory.makeJSONBoolean(false)).thenReturn(overviewRulerBorder, scrollBeyondLastLine, snippetSuggestions, useTabStops, contextmenu, folding, enabled, useShadows); when(factory.makeJSONBoolean(true)).thenReturn(automaticLayout, renderWhitespace, hideCursorInOverviewRuler); final JavaScriptObject actualOptions = factory.getConstructionOptions(); verify(options).put("language", language); verify(options).put("theme", theme); verify(options).put("renderLineHighlight", renderLineHighlight); verify(options).put("fontSize", fontSize); verify(options).put("lineNumbersMinChars", lineNumbersMinChars); verify(options).put("lineDecorationsWidth", lineDecorationsWidth); verify(options).put("overviewRulerBorder", overviewRulerBorder); verify(options).put("scrollBeyondLastLine", scrollBeyondLastLine); verify(options).put("snippetSuggestions", snippetSuggestions); verify(options).put("useTabStops", useTabStops); verify(options).put("contextmenu", contextmenu); verify(options).put("folding", folding); verify(miniMap).put("enabled", enabled); verify(scrollbar).put("useShadows", useShadows); verify(options).put("automaticLayout", automaticLayout); verify(options).put("renderWhitespace", renderWhitespace); verify(options).put("hideCursorInOverviewRuler", hideCursorInOverviewRuler); assertEquals(expectedOptions, actualOptions); }
public JavaScriptObject getConstructionOptions() { final JSONObject options = makeJSONObject(); final JSONObject scrollbar = makeJSONObject(); final JSONObject miniMap = makeJSONObject(); options.put("language", makeJSONString(FEEL_LANGUAGE_ID)); options.put("theme", makeJSONString(FEEL_THEME_ID)); options.put("renderLineHighlight", makeJSONString("none")); options.put("lineNumbers", makeJSONString("off")); options.put("fontSize", makeJSONNumber(12)); options.put("lineNumbersMinChars", makeJSONNumber(1)); options.put("lineDecorationsWidth", makeJSONNumber(1)); options.put("overviewRulerBorder", makeJSONBoolean(false)); options.put("scrollBeyondLastLine", makeJSONBoolean(false)); options.put("snippetSuggestions", makeJSONBoolean(false)); options.put("useTabStops", makeJSONBoolean(false)); options.put("contextmenu", makeJSONBoolean(false)); options.put("folding", makeJSONBoolean(false)); miniMap.put("enabled", makeJSONBoolean(false)); scrollbar.put("useShadows", makeJSONBoolean(false)); options.put("automaticLayout", makeJSONBoolean(true)); options.put("renderWhitespace", makeJSONBoolean(true)); options.put("hideCursorInOverviewRuler", makeJSONBoolean(true)); options.put("scrollbar", scrollbar); options.put("minimap", miniMap); return options.getJavaScriptObject(); }
MonacoPropertiesFactory { public JavaScriptObject getConstructionOptions() { final JSONObject options = makeJSONObject(); final JSONObject scrollbar = makeJSONObject(); final JSONObject miniMap = makeJSONObject(); options.put("language", makeJSONString(FEEL_LANGUAGE_ID)); options.put("theme", makeJSONString(FEEL_THEME_ID)); options.put("renderLineHighlight", makeJSONString("none")); options.put("lineNumbers", makeJSONString("off")); options.put("fontSize", makeJSONNumber(12)); options.put("lineNumbersMinChars", makeJSONNumber(1)); options.put("lineDecorationsWidth", makeJSONNumber(1)); options.put("overviewRulerBorder", makeJSONBoolean(false)); options.put("scrollBeyondLastLine", makeJSONBoolean(false)); options.put("snippetSuggestions", makeJSONBoolean(false)); options.put("useTabStops", makeJSONBoolean(false)); options.put("contextmenu", makeJSONBoolean(false)); options.put("folding", makeJSONBoolean(false)); miniMap.put("enabled", makeJSONBoolean(false)); scrollbar.put("useShadows", makeJSONBoolean(false)); options.put("automaticLayout", makeJSONBoolean(true)); options.put("renderWhitespace", makeJSONBoolean(true)); options.put("hideCursorInOverviewRuler", makeJSONBoolean(true)); options.put("scrollbar", scrollbar); options.put("minimap", miniMap); return options.getJavaScriptObject(); } }
MonacoPropertiesFactory { public JavaScriptObject getConstructionOptions() { final JSONObject options = makeJSONObject(); final JSONObject scrollbar = makeJSONObject(); final JSONObject miniMap = makeJSONObject(); options.put("language", makeJSONString(FEEL_LANGUAGE_ID)); options.put("theme", makeJSONString(FEEL_THEME_ID)); options.put("renderLineHighlight", makeJSONString("none")); options.put("lineNumbers", makeJSONString("off")); options.put("fontSize", makeJSONNumber(12)); options.put("lineNumbersMinChars", makeJSONNumber(1)); options.put("lineDecorationsWidth", makeJSONNumber(1)); options.put("overviewRulerBorder", makeJSONBoolean(false)); options.put("scrollBeyondLastLine", makeJSONBoolean(false)); options.put("snippetSuggestions", makeJSONBoolean(false)); options.put("useTabStops", makeJSONBoolean(false)); options.put("contextmenu", makeJSONBoolean(false)); options.put("folding", makeJSONBoolean(false)); miniMap.put("enabled", makeJSONBoolean(false)); scrollbar.put("useShadows", makeJSONBoolean(false)); options.put("automaticLayout", makeJSONBoolean(true)); options.put("renderWhitespace", makeJSONBoolean(true)); options.put("hideCursorInOverviewRuler", makeJSONBoolean(true)); options.put("scrollbar", scrollbar); options.put("minimap", miniMap); return options.getJavaScriptObject(); }  }
MonacoPropertiesFactory { public JavaScriptObject getConstructionOptions() { final JSONObject options = makeJSONObject(); final JSONObject scrollbar = makeJSONObject(); final JSONObject miniMap = makeJSONObject(); options.put("language", makeJSONString(FEEL_LANGUAGE_ID)); options.put("theme", makeJSONString(FEEL_THEME_ID)); options.put("renderLineHighlight", makeJSONString("none")); options.put("lineNumbers", makeJSONString("off")); options.put("fontSize", makeJSONNumber(12)); options.put("lineNumbersMinChars", makeJSONNumber(1)); options.put("lineDecorationsWidth", makeJSONNumber(1)); options.put("overviewRulerBorder", makeJSONBoolean(false)); options.put("scrollBeyondLastLine", makeJSONBoolean(false)); options.put("snippetSuggestions", makeJSONBoolean(false)); options.put("useTabStops", makeJSONBoolean(false)); options.put("contextmenu", makeJSONBoolean(false)); options.put("folding", makeJSONBoolean(false)); miniMap.put("enabled", makeJSONBoolean(false)); scrollbar.put("useShadows", makeJSONBoolean(false)); options.put("automaticLayout", makeJSONBoolean(true)); options.put("renderWhitespace", makeJSONBoolean(true)); options.put("hideCursorInOverviewRuler", makeJSONBoolean(true)); options.put("scrollbar", scrollbar); options.put("minimap", miniMap); return options.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 getConstructionOptions() { final JSONObject options = makeJSONObject(); final JSONObject scrollbar = makeJSONObject(); final JSONObject miniMap = makeJSONObject(); options.put("language", makeJSONString(FEEL_LANGUAGE_ID)); options.put("theme", makeJSONString(FEEL_THEME_ID)); options.put("renderLineHighlight", makeJSONString("none")); options.put("lineNumbers", makeJSONString("off")); options.put("fontSize", makeJSONNumber(12)); options.put("lineNumbersMinChars", makeJSONNumber(1)); options.put("lineDecorationsWidth", makeJSONNumber(1)); options.put("overviewRulerBorder", makeJSONBoolean(false)); options.put("scrollBeyondLastLine", makeJSONBoolean(false)); options.put("snippetSuggestions", makeJSONBoolean(false)); options.put("useTabStops", makeJSONBoolean(false)); options.put("contextmenu", makeJSONBoolean(false)); options.put("folding", makeJSONBoolean(false)); miniMap.put("enabled", makeJSONBoolean(false)); scrollbar.put("useShadows", makeJSONBoolean(false)); options.put("automaticLayout", makeJSONBoolean(true)); options.put("renderWhitespace", makeJSONBoolean(true)); options.put("hideCursorInOverviewRuler", makeJSONBoolean(true)); options.put("scrollbar", scrollbar); options.put("minimap", miniMap); return options.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; }