ReconnectDialogConfiguration { private MapProperty getProperty(String key) { NodeMap configurationMap = registry.getStateTree().getRootNode() .getMap(NodeFeatures.RECONNECT_DIALOG_CONFIGURATION); return configurationMap.getProperty(key); } ReconnectDialogConfiguration(Registry registry); static void bind(ConnectionStateHandler connectionStateHandler); boolean isDialogModal(); String getDialogText(); String getDialogTextGaveUp(); int getReconnectAttempts(); int getReconnectInterval(); int getDialogGracePeriod();  }
@Test public void reactsToChanges() { configurationUpdatedCalled.set(0); getProperty(DIALOG_MODAL_KEY).setValue(true); Reactive.flush(); Assert.assertEquals(1, configurationUpdatedCalled.get()); getProperty(DIALOG_TEXT_KEY).setValue("foo"); Reactive.flush(); Assert.assertEquals(2, configurationUpdatedCalled.get()); }
@Test public void changesReportedInOneBatch() { configurationUpdatedCalled.set(0); getProperty(RECONNECT_INTERVAL_KEY).setValue(13); getProperty(RECONNECT_ATTEMPTS_KEY).setValue(13); getProperty(DIALOG_GRACE_PERIOD_KEY).setValue(13); getProperty(DIALOG_MODAL_KEY).setValue(true); getProperty(DIALOG_TEXT_KEY).setValue("abc"); getProperty(DIALOG_TEXT_GAVE_UP_KEY).setValue("def"); Assert.assertEquals(0, configurationUpdatedCalled.get()); Reactive.flush(); Assert.assertEquals(1, configurationUpdatedCalled.get()); }