@Test public void testSelect() throws SenderException { Sender sender = service.data.get(0); service.select(sender); assertTrue(sender.isSelected()); assertEquals(service.selectedSender, sender); Sender s = new Sender(new MockDataset()); assertThrows(SenderException.class, () -> service.select(s)); service.select(null); assertNull(service.selectedSender); }
public void select(Sender sender) throws SenderException { if (sender != null && !data.contains(sender)) { throw new SenderException("Unbekannter Sender wurde ausgewählt."); } if (this.selectedSender != null) { this.selectedSender.setSelected(false); } this.selectedSender = sender; if (this.selectedSender != null) { this.selectedSender.setSelected(true); } notifyListener(); }
SenderService implements XPALProvider { public void select(Sender sender) throws SenderException { if (sender != null && !data.contains(sender)) { throw new SenderException("Unbekannter Sender wurde ausgewählt."); } if (this.selectedSender != null) { this.selectedSender.setSelected(false); } this.selectedSender = sender; if (this.selectedSender != null) { this.selectedSender.setSelected(true); } notifyListener(); } }
SenderService implements XPALProvider { public void select(Sender sender) throws SenderException { if (sender != null && !data.contains(sender)) { throw new SenderException("Unbekannter Sender wurde ausgewählt."); } if (this.selectedSender != null) { this.selectedSender.setSelected(false); } this.selectedSender = sender; if (this.selectedSender != null) { this.selectedSender.setSelected(true); } notifyListener(); } SenderService(Datasource mainDatasource, ColumnTransformer columnTransformer,
      SenderCache cache, String overrideFragDbSpalte); }
SenderService implements XPALProvider { public void select(Sender sender) throws SenderException { if (sender != null && !data.contains(sender)) { throw new SenderException("Unbekannter Sender wurde ausgewählt."); } if (this.selectedSender != null) { this.selectedSender.setSelected(false); } this.selectedSender = sender; if (this.selectedSender != null) { this.selectedSender.setSelected(true); } notifyListener(); } SenderService(Datasource mainDatasource, ColumnTransformer columnTransformer,
      SenderCache cache, String overrideFragDbSpalte); static SenderService getInstance(); @SuppressWarnings("java:S2629") long searchDefaultSender(); @Override String getCurrentSender(); void addPALChangeEventListener(XPALChangeEventListener listener); void removePALChangeEventListener(XPALChangeEventListener listener); @Override String[] getPALEntries(); void selectSender(String senderName, int idx); Map<String, String> getCurrentSenderValues(); String getCurrentSenderValue(String column); ConfigThingy getCurrentOverrideFragMap(); void showManageSenderListDialog(); void select(Sender sender); Sender createNewSender(); List<Sender> getSenderListSorted(String column); List<String> getSchema(); CompletableFuture<List<Sender>> find(Map<String, String> searchQuery); }
SenderService implements XPALProvider { public void select(Sender sender) throws SenderException { if (sender != null && !data.contains(sender)) { throw new SenderException("Unbekannter Sender wurde ausgewählt."); } if (this.selectedSender != null) { this.selectedSender.setSelected(false); } this.selectedSender = sender; if (this.selectedSender != null) { this.selectedSender.setSelected(true); } notifyListener(); } SenderService(Datasource mainDatasource, ColumnTransformer columnTransformer,
      SenderCache cache, String overrideFragDbSpalte); static SenderService getInstance(); @SuppressWarnings("java:S2629") long searchDefaultSender(); @Override String getCurrentSender(); void addPALChangeEventListener(XPALChangeEventListener listener); void removePALChangeEventListener(XPALChangeEventListener listener); @Override String[] getPALEntries(); void selectSender(String senderName, int idx); Map<String, String> getCurrentSenderValues(); String getCurrentSenderValue(String column); ConfigThingy getCurrentOverrideFragMap(); void showManageSenderListDialog(); void select(Sender sender); Sender createNewSender(); List<Sender> getSenderListSorted(String column); List<String> getSchema(); CompletableFuture<List<Sender>> find(Map<String, String> searchQuery); static final String OVERRIDE_FRAG_DB_SPALTE; static final String SENDER_KEY_SEPARATOR; }