@Test public void testShowWithModelError() { content.setError(mock(FormModelerContentError.class)); presenter.show(content, command); }
public void show(FormModelerContent content, Command onClose) { PortablePreconditions.checkNotNull("content", content); PortablePreconditions.checkNotNull("onClose", onClose); if(content.getError() != null) { return; } this.content = content; this.onClose = onClose; this.canDisplay = false; checkNewModelFields(); checkContentConflicts(); if (canDisplay) { view.show(); } }
ChangesNotificationDisplayer implements ChangesNotificationDisplayerView.Presenter { public void show(FormModelerContent content, Command onClose) { PortablePreconditions.checkNotNull("content", content); PortablePreconditions.checkNotNull("onClose", onClose); if(content.getError() != null) { return; } this.content = content; this.onClose = onClose; this.canDisplay = false; checkNewModelFields(); checkContentConflicts(); if (canDisplay) { view.show(); } } }
ChangesNotificationDisplayer implements ChangesNotificationDisplayerView.Presenter { public void show(FormModelerContent content, Command onClose) { PortablePreconditions.checkNotNull("content", content); PortablePreconditions.checkNotNull("onClose", onClose); if(content.getError() != null) { return; } this.content = content; this.onClose = onClose; this.canDisplay = false; checkNewModelFields(); checkContentConflicts(); if (canDisplay) { view.show(); } } @Inject  ChangesNotificationDisplayer(ChangesNotificationDisplayerView view,
                                        ConflictsDisplayer conflictsDisplayer,
                                        NewPropertiesDisplayer newPropertiesDisplayer,
                                        FieldManager fieldManager); }
ChangesNotificationDisplayer implements ChangesNotificationDisplayerView.Presenter { public void show(FormModelerContent content, Command onClose) { PortablePreconditions.checkNotNull("content", content); PortablePreconditions.checkNotNull("onClose", onClose); if(content.getError() != null) { return; } this.content = content; this.onClose = onClose; this.canDisplay = false; checkNewModelFields(); checkContentConflicts(); if (canDisplay) { view.show(); } } @Inject  ChangesNotificationDisplayer(ChangesNotificationDisplayerView view,
                                        ConflictsDisplayer conflictsDisplayer,
                                        NewPropertiesDisplayer newPropertiesDisplayer,
                                        FieldManager fieldManager); void show(FormModelerContent content, Command onClose); @Override FormModel getFormModel(); @Override void close(); }
ChangesNotificationDisplayer implements ChangesNotificationDisplayerView.Presenter { public void show(FormModelerContent content, Command onClose) { PortablePreconditions.checkNotNull("content", content); PortablePreconditions.checkNotNull("onClose", onClose); if(content.getError() != null) { return; } this.content = content; this.onClose = onClose; this.canDisplay = false; checkNewModelFields(); checkContentConflicts(); if (canDisplay) { view.show(); } } @Inject  ChangesNotificationDisplayer(ChangesNotificationDisplayerView view,
                                        ConflictsDisplayer conflictsDisplayer,
                                        NewPropertiesDisplayer newPropertiesDisplayer,
                                        FieldManager fieldManager); void show(FormModelerContent content, Command onClose); @Override FormModel getFormModel(); @Override void close();  }