CheatSheetViewImpl extends Composite implements CheatSheetView { @Override public void setDMNCheatSheetContent() { ruleCheatSheet.getStyle().setDisplay(Style.Display.NONE); dmnCheatSheet.getStyle().setDisplay(Style.Display.BLOCK); dmnCheatSheetParagraph1.setInnerHTML(ScenarioSimulationEditorConstants.INSTANCE.dmnCheatSheet1()); dmnCheatSheetParagraph2.setInnerHTML(ScenarioSimulationEditorConstants.INSTANCE.dmnCheatSheet2() + " <b>" + ScenarioSimulationEditorConstants.INSTANCE.testEditor() + "</b> " + ScenarioSimulationEditorConstants.INSTANCE.dmnCheatSheet3()); dmnCheatSheetParagraph3.setInnerHTML(ScenarioSimulationEditorConstants.INSTANCE.dmnCheatSheet4()); dmnCheatSheetParagraph4.setInnerHTML(ScenarioSimulationEditorConstants.INSTANCE.dmnCheatSheet5()); dmnCheatSheetParagraphBackground.setInnerHTML(backgroundMessage()); dmnCheatSheetParagraph5.setInnerHTML(ScenarioSimulationEditorConstants.INSTANCE.dmnCheatSheet6()); dmnCheatSheetList1.setInnerHTML("<i>" + ScenarioSimulationEditorConstants.INSTANCE.dmnCheatSheet7() + " " + "</i>" + ScenarioSimulationEditorConstants.INSTANCE.and() + " " + "<i>" + ScenarioSimulationEditorConstants.INSTANCE.dmnCheatSheet8() + "</i>" + " " + ScenarioSimulationEditorConstants.INSTANCE.dmnCheatSheet9() + " " + "<tt>\"John Doe\"</tt>" + " " + ScenarioSimulationEditorConstants.INSTANCE.or() + " " + "<tt>\"\"</tt>"); dmnCheatSheetList2.setInnerHTML("<i>" + ScenarioSimulationEditorConstants.INSTANCE.dmnCheatSheet10() + "</i> (<tt>true</tt>, <tt>false</tt>, " + ScenarioSimulationEditorConstants.INSTANCE.and() + " " + "<tt>null</tt>)"); dmnCheatSheetList3.setInnerHTML("<i>" + ScenarioSimulationEditorConstants.INSTANCE.dmnCheatSheet11() + "</i>" + " " + ScenarioSimulationEditorConstants.INSTANCE.and() + " " + "<i>" + ScenarioSimulationEditorConstants.INSTANCE.dmnCheatSheet12() + "</i>" + ScenarioSimulationEditorConstants.INSTANCE.forExample() + " " + "<tt>date(\"2019-05-13\")<sup>*</sup></tt>" + " " + ScenarioSimulationEditorConstants.INSTANCE.or() + " " + "<tt>time(\"14:10:00+02:00\")<sup>*</sup></tt>"); dmnCheatSheetList4.setInnerHTML("<i>" + ScenarioSimulationEditorConstants.INSTANCE.dmnCheatSheet19() + "</i>" + ScenarioSimulationEditorConstants.INSTANCE.forExample() + " " + "<tt>duration(\"P1DT23H12M30S\")<sup>*</sup></tt>"); dmnCheatSheetList5.setInnerHTML("<i>" + ScenarioSimulationEditorConstants.INSTANCE.dmnCheatSheet20() + "</i>" + ScenarioSimulationEditorConstants.INSTANCE.forExample() + " " + "<tt>duration(\"P3Y5M\")<sup>*</sup></tt>"); dmnCheatSheetList6.setInnerHTML("<i>" + ScenarioSimulationEditorConstants.INSTANCE.dmnCheatSheet13() + "</i>"); dmnCheatSheetList7.setInnerHTML("<i>" + ScenarioSimulationEditorConstants.INSTANCE.dmnCheatSheet14() + "</i>" + ScenarioSimulationEditorConstants.INSTANCE.forExample() + " " + "<tt>{x : 5, even : false, type : \"integer number\"}</tt>"); dmnCheatSheetList8.setInnerHTML("<i>" + ScenarioSimulationEditorConstants.INSTANCE.dmnCheatSheet15() + "</i>" + " " + ScenarioSimulationEditorConstants.INSTANCE.and() + " " + "<i>" + ScenarioSimulationEditorConstants.INSTANCE.dmnCheatSheet16() + "</i>" + ScenarioSimulationEditorConstants.INSTANCE.forExample() + " " + "<tt>[1 .. 10]</tt> or <tt>[2, 3, 4, 5]</tt>"); dmnCheatSheetList9.setInnerText(ScenarioSimulationEditorConstants.INSTANCE.dmnCheatSheet18()); dmnCheatSheetParagraph6.setInnerHTML(ScenarioSimulationEditorConstants.INSTANCE.dmnCheatSheet17()); dmnCheatSheetParagraph7.setInnerHTML("<i><sup>*</sup> " + ScenarioSimulationEditorConstants.INSTANCE.dmnCheatSheet21() + "</i>"); }  @Override void init(Presenter presenter); @Override Presenter getPresenter(); @Override void setRuleCheatSheetContent(); @Override void setDMNCheatSheetContent(); @Override void reset();  }
@Test public void setDMNCheatSheetContent() { cheatSheetView.setDMNCheatSheetContent(); verify(ruleCheatSheetStyleMock, times(1)).setDisplay(Style.Display.NONE); verify(dmnCheatSheetStyleMock, times(1)).setDisplay(Style.Display.BLOCK); }