@Test public void testShow() { when(fieldInfo.getCurrentValue(SequenceGeneratorValueHandler.SEQUENCE_NAME)).thenReturn(SEQUENCE_NAME_VALUE); when(fieldInfo.getCurrentValue(SequenceGeneratorValueHandler.NAME)).thenReturn(NAME_VALUE); when(fieldInfo.getCurrentValue(SequenceGeneratorValueHandler.INITIAL_VALUE)).thenReturn(INITIAL_VALUE); when(fieldInfo.getCurrentValue(SequenceGeneratorValueHandler.ALLOCATION_SIZE)).thenReturn(ALLOCATION_SIZE_VALUE); when(fieldInfo.isDisabled()).thenReturn(false); dialog.setProperty(fieldInfo); dialog.show(); verify(view).setSequenceName(SEQUENCE_NAME_VALUE); verify(view).setGeneratorName(NAME_VALUE); verify(view).setInitialValue(INITIAL_VALUE.toString()); verify(view).clearInitialValueError(); verify(view).setAllocationSize(ALLOCATION_SIZE_VALUE.toString()); verify(view).clearAllocationSizeError(); verify(view).setEnabled(!fieldInfo.isDisabled()); verify(view).show(); }
@Override public void show() { DataModelerPropertyEditorFieldInfo fieldInfo = (DataModelerPropertyEditorFieldInfo) property; String sequenceName = (String) fieldInfo.getCurrentValue(SequenceGeneratorValueHandler.SEQUENCE_NAME); String generatorName = (String) fieldInfo.getCurrentValue(SequenceGeneratorValueHandler.NAME); Object initialValue = fieldInfo.getCurrentValue(SequenceGeneratorValueHandler.INITIAL_VALUE); Object allocationSize = fieldInfo.getCurrentValue(SequenceGeneratorValueHandler.ALLOCATION_SIZE); view.setSequenceName(sequenceName); view.setGeneratorName(generatorName); view.setInitialValue(initialValue != null ? initialValue.toString() : null); view.clearInitialValueError(); view.setAllocationSize(allocationSize != null ? allocationSize.toString() : null); view.clearAllocationSizeError(); view.setEnabled(!fieldInfo.isDisabled()); view.show(); }
SequenceGeneratorEditionDialog implements PropertyEditionPopup { @Override public void show() { DataModelerPropertyEditorFieldInfo fieldInfo = (DataModelerPropertyEditorFieldInfo) property; String sequenceName = (String) fieldInfo.getCurrentValue(SequenceGeneratorValueHandler.SEQUENCE_NAME); String generatorName = (String) fieldInfo.getCurrentValue(SequenceGeneratorValueHandler.NAME); Object initialValue = fieldInfo.getCurrentValue(SequenceGeneratorValueHandler.INITIAL_VALUE); Object allocationSize = fieldInfo.getCurrentValue(SequenceGeneratorValueHandler.ALLOCATION_SIZE); view.setSequenceName(sequenceName); view.setGeneratorName(generatorName); view.setInitialValue(initialValue != null ? initialValue.toString() : null); view.clearInitialValueError(); view.setAllocationSize(allocationSize != null ? allocationSize.toString() : null); view.clearAllocationSizeError(); view.setEnabled(!fieldInfo.isDisabled()); view.show(); } }
SequenceGeneratorEditionDialog implements PropertyEditionPopup { @Override public void show() { DataModelerPropertyEditorFieldInfo fieldInfo = (DataModelerPropertyEditorFieldInfo) property; String sequenceName = (String) fieldInfo.getCurrentValue(SequenceGeneratorValueHandler.SEQUENCE_NAME); String generatorName = (String) fieldInfo.getCurrentValue(SequenceGeneratorValueHandler.NAME); Object initialValue = fieldInfo.getCurrentValue(SequenceGeneratorValueHandler.INITIAL_VALUE); Object allocationSize = fieldInfo.getCurrentValue(SequenceGeneratorValueHandler.ALLOCATION_SIZE); view.setSequenceName(sequenceName); view.setGeneratorName(generatorName); view.setInitialValue(initialValue != null ? initialValue.toString() : null); view.clearInitialValueError(); view.setAllocationSize(allocationSize != null ? allocationSize.toString() : null); view.clearAllocationSizeError(); view.setEnabled(!fieldInfo.isDisabled()); view.show(); } @Inject  SequenceGeneratorEditionDialog(View view); }
SequenceGeneratorEditionDialog implements PropertyEditionPopup { @Override public void show() { DataModelerPropertyEditorFieldInfo fieldInfo = (DataModelerPropertyEditorFieldInfo) property; String sequenceName = (String) fieldInfo.getCurrentValue(SequenceGeneratorValueHandler.SEQUENCE_NAME); String generatorName = (String) fieldInfo.getCurrentValue(SequenceGeneratorValueHandler.NAME); Object initialValue = fieldInfo.getCurrentValue(SequenceGeneratorValueHandler.INITIAL_VALUE); Object allocationSize = fieldInfo.getCurrentValue(SequenceGeneratorValueHandler.ALLOCATION_SIZE); view.setSequenceName(sequenceName); view.setGeneratorName(generatorName); view.setInitialValue(initialValue != null ? initialValue.toString() : null); view.clearInitialValueError(); view.setAllocationSize(allocationSize != null ? allocationSize.toString() : null); view.clearAllocationSizeError(); view.setEnabled(!fieldInfo.isDisabled()); view.show(); } @Inject  SequenceGeneratorEditionDialog(View view); @Override Widget asWidget(); @Override void show(); @Override void setOkCommand(Command okCommand); @Override void setProperty(PropertyEditorFieldInfo property); @Override String getStringValue(); @Override void setStringValue(String value); }
SequenceGeneratorEditionDialog implements PropertyEditionPopup { @Override public void show() { DataModelerPropertyEditorFieldInfo fieldInfo = (DataModelerPropertyEditorFieldInfo) property; String sequenceName = (String) fieldInfo.getCurrentValue(SequenceGeneratorValueHandler.SEQUENCE_NAME); String generatorName = (String) fieldInfo.getCurrentValue(SequenceGeneratorValueHandler.NAME); Object initialValue = fieldInfo.getCurrentValue(SequenceGeneratorValueHandler.INITIAL_VALUE); Object allocationSize = fieldInfo.getCurrentValue(SequenceGeneratorValueHandler.ALLOCATION_SIZE); view.setSequenceName(sequenceName); view.setGeneratorName(generatorName); view.setInitialValue(initialValue != null ? initialValue.toString() : null); view.clearInitialValueError(); view.setAllocationSize(allocationSize != null ? allocationSize.toString() : null); view.clearAllocationSizeError(); view.setEnabled(!fieldInfo.isDisabled()); view.show(); } @Inject  SequenceGeneratorEditionDialog(View view); @Override Widget asWidget(); @Override void show(); @Override void setOkCommand(Command okCommand); @Override void setProperty(PropertyEditorFieldInfo property); @Override String getStringValue(); @Override void setStringValue(String value);  }